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

Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$converterMap array Map of converters.

Méthodes publiques

Méthode 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 méthode

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 méthode

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

register() public méthode

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
Résultat array