PHP Class eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry

Datei anzeigen Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$converterMap array Map of converters.

Public Methods

Method Description
__construct ( array $converterMap = [] ) Create converter registry with converter map.
getConverter ( string $typeName ) : eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter Returns converter for $typeName.
register ( string $typeName, mixed $converter ) Register a $converter for $typeName.

Method Details

__construct() public method

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 {@link \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter} interface.
public __construct ( array $converterMap = [] )
$converterMap array A map where key is field type name, and value is a callable factory to get Converter OR Converter object

getConverter() public method

Returns converter for $typeName.
public getConverter ( string $typeName ) : eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter
$typeName string
return eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter

register() public method

Register a $converter for $typeName.
public register ( string $typeName, mixed $converter )
$typeName string
$converter mixed Callable or converter instance

Property Details

$converterMap protected_oe property

Map of converters.
protected array $converterMap
return array