eZPublishCommunityProject  2013.9
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...
 
 getStorage ($typeName)
 Returns the storage for $typeName. More...
 
 register ($typeName, $storage)
 Register $storage for $typeName. More...
 

Protected Attributes

 $storageMap = array()
 

Detailed Description

Registry for external storages.

Constructor & Destructor Documentation

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\FieldStorageinterface.@paramarray$storageMapAmapwherekeyisfieldtypename,andvalueisacallablefactorytogetFieldStorageORFieldStorageobject

Member Function Documentation

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

Returns the storage for $typeName.

Parameters
string$typeName
Exceptions
\RuntimeExceptionWhen type is neither FieldStorage instance or callable factory
Returns
eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry::register (   $typeName,
  $storage 
)

Register $storage for $typeName.

Parameters
string$typeName
mixed$storageCallable or FieldStorage
Returns
void

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry::$storageMap = array()
protected

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