eZPublishCommunityProject  2012.12
eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter Class Reference
+ Inheritance diagram for eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter:
+ Collaboration diagram for eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter:

Public Member Functions

 __construct (ObjectConverter $genericConverter)
 
 addConverter (ObjectConverter $converter, $class)
 Registers $converter for classes contained in $classes. More...
 
 convert ($object)
 Converts $object to make it compatible with eZTemplate API. More...
 
 convertAll ()
 Converts all registered objects and returns them in a hash where the object's alias is the key. More...
 
 register ($object, $alias)
 Registers an object to the converter. More...
 

Private Attributes

 $convertersMap
 
 $genericConverter
 
 $objectsToConvert
 

Constructor & Destructor Documentation

eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter::__construct ( ObjectConverter  $genericConverter)

Member Function Documentation

eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter::addConverter ( ObjectConverter  $converter,
  $class 
)

Registers $converter for classes contained in $classes.

Parameters
\eZ\Publish\Core\MVC\Legacy\Templating\Converter\ObjectConverter$converter
string$classClass the converter is for
eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter::convert (   $object)

Converts $object to make it compatible with eZTemplate API.

Parameters
object$object
Exceptions
\InvalidArgumentExceptionIf $object is actually not an object
Returns
mixed|

Implements eZ\Publish\Core\MVC\Legacy\Templating\Converter\ObjectConverter.

eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter::convertAll ( )

Converts all registered objects and returns them in a hash where the object's alias is the key.

Returns
array|[]

Implements eZ\Publish\Core\MVC\Legacy\Templating\Converter\MultipleObjectConverter.

eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter::register (   $object,
  $alias 
)

Registers an object to the converter.

$alias is the variable name that will be exposed in the legacy template.

Parameters
mixed$object
string$alias
Exceptions
\InvalidArgumentExceptionIf $object is not an object
Returns
void

Implements eZ\Publish\Core\MVC\Legacy\Templating\Converter\MultipleObjectConverter.

Member Data Documentation

eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter::$convertersMap
private
eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter::$genericConverter
private
eZ\Publish\Core\MVC\Legacy\Templating\Converter\DelegatingConverter::$objectsToConvert
private

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