eZPublishCommunityProject  2012.12
eZ\Publish\Core\FieldType\GatewayBasedStorage Class Reference

Storage gateway base class to be used by FieldType storages. More...

+ Inheritance diagram for eZ\Publish\Core\FieldType\GatewayBasedStorage:
+ Collaboration diagram for eZ\Publish\Core\FieldType\GatewayBasedStorage:

Public Member Functions

 __construct (array $gateways)
 Construct from gateways. More...
 addGateway ($identifier, StorageGateway $gateway)
 Adds a storage $gateway assigned to the given $identifier. More...
- Public Member Functions inherited from eZ\Publish\SPI\FieldType\FieldStorage
 deleteFieldData (VersionInfo $versionInfo, array $fieldIds, array $context)
 Deletes field data for all $fieldIds in the version identified by $versionInfo. More...
 getFieldData (VersionInfo $versionInfo, Field $field, array $context)
 Populates $field value property based on the external data. More...
 getIndexData (VersionInfo $versionInfo, Field $field, array $context)
 Get index data for external data for search backend. More...
 hasFieldData ()
 Checks if field type has external data to deal with. More...
 storeFieldData (VersionInfo $versionInfo, Field $field, array $context)
 Allows custom field types to store data in an external source (e.g. More...

Protected Member Functions

 getGateway (array $context)
 Retrieve the fitting gateway, base on the identifier in $context. More...

Protected Attributes


Detailed Description

Storage gateway base class to be used by FieldType storages.

This class gives a common basis to realized gateway based storage dispatching. It is intended to deal as a base class for FieldType storages, giving a common infrastructure to handle multiple gateways, based on the context provided by the SPI.

The method getGateway() is used in derived classes to retrieve the correct gateway implementation, based on the context. The method getPersistenceHandler() can be used to retrieve the SPI persistence handler. It is encouraged, to use this object to retrieve any eZ Publish internal data objects, in order to allow caching.

Constructor & Destructor Documentation

eZ\Publish\Core\FieldType\GatewayBasedStorage::__construct ( array  $gateways)

Construct from gateways.


Member Function Documentation

eZ\Publish\Core\FieldType\GatewayBasedStorage::addGateway (   $identifier,
StorageGateway  $gateway 

Adds a storage $gateway assigned to the given $identifier.


Referenced by eZ\Publish\Core\FieldType\GatewayBasedStorage\__construct().

Member Data Documentation


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