eZPublishCommunityProject  2012.12
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry Class Reference

Public Member Functions

 __construct (array $converterMap)
 Create converter registry with converter map. More...
 
 getConverter ($typeName)
 Returns converter for $typeName. More...
 
 register ($typeName, $converter)
 Register a $converter for $typeName. More...
 

Protected Attributes

 $converterMap = array()
 

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry::__construct ( array  $converterMap)

Create converter registry with converter map.

In $converterMap a array consists of a mapping of field type names to object / callable is expected, in case of callable factory converter object should be returned on execution. The object is used to convert content fields and content type field definitions to the legacy storage engine. The given class names must derive the eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converterinterface.@paramarray$converterMapAmapwherekeyisfieldtypename,andvalueisacallablefactorytogetConverterORConverterobject

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry::getConverter (   $typeName)

Returns converter for $typeName.

Parameters
string$typeName
Exceptions
\eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception\NotFound
\RuntimeExceptionWhen type is neither Converter instance or callable factory
Returns
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry::register (   $typeName,
  $converter 
)

Register a $converter for $typeName.

Parameters
string$typeName
mixed$converterCallable or converter instance
Returns
void

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry::$converterMap = array()
protected

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