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\StorageRegistry Class Reference

Registry for external storages. More...

## Public Member Functions
| __construct (array $storageMap)
| Create field storage registry with converter map. More...
| register ($typeName, $storage)
| Register $storage for $typeName. More...
| getStorage ($typeName)
| Returns the storage for $typeName. More...

## Protected Attributes
| $storageMap = []

## Detailed Description

Registry for external storages.

Definition at line 15 of file StorageRegistry.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry::__construct | ( | array | $storageMap | ) |

Create field storage registry with converter map.

In $storageMap a mapping of field type names to object / callable is expected, in case of callable factory it should return the storage object. The object is used to store/restore/delete/… data in external storage (e.g.another database or a web service). The storage object must comply to the \eZ\Publish\SPI\FieldType\FieldStorage interface.

Parameters

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

Definition at line 36 of file StorageRegistry.php.

References eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry\$storageMap.

## Member Function Documentation

## ◆ getStorage()

eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry::getStorage | ( |  | $typeName | ) |

Returns the storage for $typeName.

Parameters

  string | $typeName |

Exceptions

Definition at line 63 of file StorageRegistry.php.

## ◆ register()

eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry::register | ( |  | $typeName,
|  |  | $storage
| ) |  |

Register $storage for $typeName.

Parameters

  string | $typeName |
  mixed | $storage | Callable or FieldStorage

Definition at line 49 of file StorageRegistry.php.

## Member Data Documentation

## ◆ $storageMap

eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry::$storageMap = []
| protected

Definition at line 22 of file StorageRegistry.php.

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

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

- StorageRegistry.php

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