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\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 = []
| $fieldTypeMap = []

## Detailed Description

Registry for field types available to storage engines.

Definition at line 16 of file Persistence/FieldTypeRegistry.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Parameters

  array | $fieldTypeMap | A map where key is field type identifier and value is a callable factory to get FieldType OR FieldType object.

Definition at line 43 of file Persistence/FieldTypeRegistry.php.

References eZ\Publish\Core\Persistence\FieldTypeRegistry\$fieldTypeMap.

## Member Function Documentation

## ◆ getFieldType()

eZ\Publish\Core\Repository\Helper\FieldTypeRegistry::getFieldType | ( |  | $identifier | ) |

Returns the FieldType object for given $identifier.

Return a SPI FieldType object.

Parameters

  string | $identifier |

Exceptions

  FieldTypeNotFoundException | If field type for given $identifier is not found.

Definition at line 58 of file Persistence/FieldTypeRegistry.php.

## ◆ register()

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

Parameters

  | $identifier |
  mixed | $fieldType | Callable or FieldType instance.

Definition at line 77 of file Persistence/FieldTypeRegistry.php.

## Member Data Documentation

## ◆ $coreFieldTypeMap

eZ\Publish\Core\Persistence\FieldTypeRegistry::$coreFieldTypeMap = []
| protected

Definition at line 24 of file Persistence/FieldTypeRegistry.php.

## ◆ $fieldTypeMap

eZ\Publish\Core\Persistence\FieldTypeRegistry::$fieldTypeMap = []
| protected

Definition at line 31 of file Persistence/FieldTypeRegistry.php.

Referenced by eZ\Publish\Core\Persistence\FieldTypeRegistry\__construct().

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

- Persistence/FieldTypeRegistry.php

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