PHP Класс eZ\Publish\Core\FieldType\GatewayBasedStorage

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 {@link getGateway()} is used in derived classes to retrieve the correct gateway implementation, based on the context.
Наследование: implements eZ\Publish\SPI\FieldType\FieldStorage
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$gateways StorageGateway[] Gateways.

Открытые методы

Метод Описание
__construct ( array $gateways = [] ) Construct from gateways.
addGateway ( string $identifier, StorageGateway $gateway ) Adds a storage $gateway assigned to the given $identifier.
copyLegacyField ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content\Field $originalField, array $context ) : null | boolean 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.

Защищенные методы

Метод Описание
getGateway ( array $context ) : StorageGateway Retrieve the fitting gateway, base on the identifier in $context.

Описание методов

__construct() публичный метод

Construct from gateways.
public __construct ( array $gateways = [] )
$gateways array

addGateway() публичный метод

Adds a storage $gateway assigned to the given $identifier.
public addGateway ( string $identifier, StorageGateway $gateway )
$identifier string
$gateway StorageGateway

copyLegacyField() публичный метод

By default the method falls back to the {@link \eZ\Publish\SPI\FieldType\FieldStorage::storeFieldData()}. External storages implement this method as needed.
public copyLegacyField ( eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo, eZ\Publish\SPI\Persistence\Content\Field $field, eZ\Publish\SPI\Persistence\Content\Field $originalField, array $context ) : null | boolean
$versionInfo eZ\Publish\SPI\Persistence\Content\VersionInfo
$field eZ\Publish\SPI\Persistence\Content\Field
$originalField eZ\Publish\SPI\Persistence\Content\Field
$context array
Результат null | boolean Same as {@link \eZ\Publish\SPI\FieldType\FieldStorage::storeFieldData()}.

getGateway() защищенный метод

Retrieve the fitting gateway, base on the identifier in $context.
protected getGateway ( array $context ) : StorageGateway
$context array
Результат StorageGateway

Описание свойств

$gateways защищенное свойство

Gateways.
protected StorageGateway[],eZ\Publish\Core\FieldType $gateways
Результат StorageGateway[]