|
Revision 349, 1.6 kB
(checked in by gerd, 3 years ago)
|
Draft of new feature: attribute filter
|
- Property svn:keywords set to
"Id"
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
class patForms_AttributeFilter |
|---|
| 21 |
{ |
|---|
| 22 |
|
|---|
| 23 |
* Filter attribute value on "apply"-event |
|---|
| 24 |
* |
|---|
| 25 |
* This method is applied when patForms_Element:applyAttributeFilter() |
|---|
| 26 |
* or patForms::applyAttributeFilter() is called. |
|---|
| 27 |
* |
|---|
| 28 |
* @abstract |
|---|
| 29 |
* @access public |
|---|
| 30 |
* @param string element's type |
|---|
| 31 |
* @param string attribute's names |
|---|
| 32 |
* @param mixed attribute's value |
|---|
| 33 |
* @return mixed true on success, patError-object on error |
|---|
| 34 |
*/ |
|---|
| 35 |
function onApply($type, $attribute, &$value) |
|---|
| 36 |
{ |
|---|
| 37 |
return true; |
|---|
| 38 |
} |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
* Filter attribute value on "set"-event |
|---|
| 42 |
* |
|---|
| 43 |
* This method is invoced whenever patForms_Element::setAttribute() is called. |
|---|
| 44 |
* The exception is during the initializing process, when the form is created. |
|---|
| 45 |
* When the element is new, there is no attribute filter available. |
|---|
| 46 |
* |
|---|
| 47 |
* @abstract |
|---|
| 48 |
* @access public |
|---|
| 49 |
* @param string element's type |
|---|
| 50 |
* @param string attribute's names |
|---|
| 51 |
* @param mixed attribute's value |
|---|
| 52 |
* @return mixed true on success, patError-object on error |
|---|
| 53 |
*/ |
|---|
| 54 |
function onSet($type, $attribute, &$value) |
|---|
| 55 |
{ |
|---|
| 56 |
return true; |
|---|
| 57 |
} |
|---|
| 58 |
} |
|---|
| 59 |
?> |
|---|