eZPublishCommunityProject  2013.9
eZ\Publish\Core\Persistence\FieldTypeRegistry Class Reference

Registry for field types available to storage engines. More...

Public Member Functions

 __construct (array $fieldTypeMap)
 Creates FieldType registry. More...
 
 getFieldType ($identifier)
 Returns the FieldType object for given $identifier. More...
 
 register ($identifier, $fieldType)
 Register $fieldType with $identifier. More...
 

Protected Attributes

 $coreFieldTypeMap = array()
 
 $fieldTypeMap = array()
 

Detailed Description

Registry for field types available to storage engines.

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\FieldTypeRegistry::__construct ( array  $fieldTypeMap)

Creates FieldType registry.

In $fieldTypeMap a mapping of field type identifier to object / callable is expected, in case of callable factory it should return the FieldType object. The FieldType object must comply to the eZ\Publish\SPI\FieldType\FieldTypeinterface.@paramarray$fieldTypeMapAmapwherekeyisfieldtypeidentifierandvalueisacallablefactorytogetFieldTypeORFieldTypeobject.

Member Function Documentation

eZ\Publish\Core\Persistence\FieldTypeRegistry::getFieldType (   $identifier)

Returns the FieldType object for given $identifier.

Parameters
string$identifier
Exceptions
\RuntimeExceptionIf field type for given $identifier is not found.
\RuntimeExceptionIf field type for given $identifier is not instance or callable.
Returns
eZ\Publish\Core\Persistence\FieldTypeRegistry::register (   $identifier,
  $fieldType 
)

Register $fieldType with $identifier.

For $fieldType an object / callable is expected, in case of callable factory it should return the FieldType object. The FieldType object must comply to the eZ\Publish\SPI\FieldType\FieldTypeinterface.@param$identifier@parammixed$fieldTypeCallableorFieldTypeinstance.@returnvoid

Member Data Documentation

eZ\Publish\Core\Persistence\FieldTypeRegistry::$coreFieldTypeMap = array()
protected
eZ\Publish\Core\Persistence\FieldTypeRegistry::$fieldTypeMap = array()
protected

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