eZTemplateLocaleOperator Class Reference
[Template operators]

Locale aware conversions and output using operator "l10n". More...

List of all members.


Public Methods

 eZTemplateLocaleOperator ($localeName= 'l10n',$dateTimeName= 'datetime',$currentDateName= 'currentdate')
operatorList ()
 namedParameterPerOperator ()
 namedParameterList ()
 modify (&$tpl,&$operatorName,&$operatorParameters,&$rootNamespace,&$currentNamespace,&$operatorValue,&$namedParameters)

Private Attributes

 Operators
 Locale
 A reference to the locale object.


Detailed Description

Locale aware conversions and output using operator "l10n".

This class takes care of converting variables and displaying them according to their locale settings. The class has one operator called l10n(short for localization) which takes one parameter which is localization type. Supported types are time, shorttime, date, shortdate, currency and number.

// Example template code
{$curdate|l10n(date)}
{$cash|l10n(currency)}

Definition at line eztemplatelocaleoperator.php.


Constructor & Destructor Documentation

eZTemplateLocaleOperator::eZTemplateLocaleOperator   localeName = 'l10n',
  dateTimeName = 'datetime',
  currentDateName = 'currentdate'
 

Initializes the object with the default locale.

Note:
Add support for specifying the locale object.

Definition at line eztemplatelocaleoperator.php.

References Operators.


Member Function Documentation

eZTemplateLocaleOperator::modify &$    tpl,
&$    operatorName,
&$    operatorParameters,
&$    rootNamespace,
&$    currentNamespace,
&$    operatorValue,
&$    namedParameters
 

Converts the variable according to the locale type. Allowed types are:

  • time
  • shorttime
  • date
  • shortdate
  • currency
  • number

Definition at line eztemplatelocaleoperator.php.

References eZINI::instance().

eZTemplateLocaleOperator::namedParameterList  
 

See eZTemplateOperator::namedParameterList

Definition at line eztemplatelocaleoperator.php.

eZTemplateLocaleOperator::namedParameterPerOperator  
 

Returns:
true to tell the template engine that the parameter list exists per operator type.

Definition at line eztemplatelocaleoperator.php.

& eZTemplateLocaleOperator::operatorList  
 

Returns array with l10n.

Definition at line eztemplatelocaleoperator.php.

References Operators.


Member Data Documentation

eZTemplateLocaleOperator::Operators [private]
 

The operator array

Definition at line eztemplatelocaleoperator.php.

Referenced by operatorList().


The documentation for this class was generated from the following file:  

Exponential