eZTemplatePHPOperator Class Reference
[Template operators]
Makes it easy to add php functions as operators.
More...
List of all members.
|
Public Methods |
| eZTemplatePHPOperator ($php_names) |
& | operatorList () |
| modify (&$tpl,&$operatorName,&$operatorParameters,&$rootNamespace,&$currentNamespace,&$value) |
Public Attributes |
| Operators |
| The array of operators, used for registering operators.
|
| PHPNames |
| The associative array of operator/php function redirection.
|
Detailed Description
Makes it easy to add php functions as operators.
This class makes it easy to add existing PHP functions as template operators. It maps a template operator to a PHP function, the function must take one parameter and return the result. The redirection is done by supplying an associative array to the class, each key is the operatorname and the value is the PHP function name.
Example: $tpl->registerOperators( new eZTemplatePHPOperator( array( "upcase" => "strtoupper",
"reverse" => "strrev" ) ) );
Definition at line eztemplatephpoperator.php.
Constructor & Destructor Documentation
eZTemplatePHPOperator::eZTemplatePHPOperator |
( |
$ |
php_names |
) |
|
|
Member Function Documentation
eZTemplatePHPOperator::modify |
( |
&$ |
tpl, |
|
|
&$ |
operatorName, |
|
|
&$ |
operatorParameters, |
|
|
&$ |
rootNamespace, |
|
|
&$ |
currentNamespace, |
|
|
&$ |
value |
|
) |
|
|
& eZTemplatePHPOperator::operatorList |
( |
|
) |
|
|
The documentation for this class was generated from the following file:
|