eZPublishCommunityProject  2013.6
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=array())
 Construct from gateways. More...
 
 addGateway ($identifier, StorageGateway $gateway)
 Adds a storage $gateway assigned to the given $identifier. More...
 
 copyLegacyField (VersionInfo $versionInfo, Field $field, Field $originalField, array $context)
 This method is used exclusively by Legacy Storage to copy external data of existing field in main language to the untranslatable field not passed in create or update struct, but created implicitly in storage layer. 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

 $gateways
 

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.

Constructor & Destructor Documentation

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

Construct from gateways.

Parameters
\eZ\Publish\Core\FieldType\StorageGateway[]$gateways

Member Function Documentation

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

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

Parameters
string$identifier
\eZ\Publish\Core\FieldType\StorageGateway$gateway
Returns
void

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

eZ\Publish\Core\FieldType\GatewayBasedStorage::copyLegacyField ( VersionInfo  $versionInfo,
Field  $field,
Field  $originalField,
array  $context 
)

This method is used exclusively by Legacy Storage to copy external data of existing field in main language to the untranslatable field not passed in create or update struct, but created implicitly in storage layer.

By default the method falls back to the eZ\Publish\SPI\FieldType\FieldStorage::storeFieldData().Externalstoragesimplementthismethodasneeded.@param\eZ\Publish\SPI\Persistence\Content\VersionInfo$versionInfo@param\eZ\Publish\SPI\Persistence\Content\Field$field@param\eZ\Publish\SPI\Persistence\Content\Field$originalField@paramarray$context@returnnull|booleanSameas@link\eZ\Publish\SPI\FieldType\FieldStorage::storeFieldData().

Member Data Documentation

eZ\Publish\Core\FieldType\GatewayBasedStorage::$gateways
protected

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