Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry Class Reference

## Public Member Functions
| __construct (array $converterMap=[])
| Create converter registry with converter map. More...
| register ($typeName, $converter)
| Register a $converter for $typeName. More...
| getConverter ($typeName)
| Returns converter for $typeName. More...

## Protected Attributes
| $converterMap = []

## Detailed Description

Definition at line 11 of file ConverterRegistry.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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\Converter interface.

Parameters

  array | $converterMap | A map where key is field type name, and value is a callable factory to get Converter OR Converter object

Definition at line 34 of file ConverterRegistry.php.

References eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry\$converterMap.

## Member Function Documentation

## ◆ getConverter()

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

Returns converter for $typeName.

Parameters

  string | $typeName |

Exceptions

Definition at line 60 of file ConverterRegistry.php.

## ◆ register()

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry::register | ( |  | $typeName,
|  |  | $converter
| ) |  |

Register a $converter for $typeName.

Parameters

  string | $typeName |
  mixed | $converter | Callable or converter instance

Definition at line 45 of file ConverterRegistry.php.

## Member Data Documentation

## ◆ $converterMap

eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry::$converterMap = []
| protected

Definition at line 18 of file ConverterRegistry.php.

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry\__construct().

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

- ConverterRegistry.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.