PHP Class eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter

Inheritance: implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter
显示文件 Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
__construct ( eZ\Publish\Core\IO\IOServiceInterface $imageIoService, eZ\Publish\Core\IO\UrlRedecorator $urlRedecorator )
getIndexColumn ( ) : string Returns the name of the index column in the attribute table.
toFieldDefinition ( StorageFieldDefinition $storageDef, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef ) Converts field definition data in $storageDef into $fieldDef.
toFieldValue ( StorageFieldValue $value, eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) Converts data from $value to $fieldValue.
toStorageFieldDefinition ( eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef, StorageFieldDefinition $storageDef ) Converts field definition data in $fieldDef into $storageFieldDef.
toStorageValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $value, StorageFieldValue $storageFieldValue ) Converts data from $value to $storageFieldValue.

Protected Methods

Method Description
createEmptyLegacyXml ( array $contentMetaData ) : string Creates an XML considered "empty" by the legacy storage.
createLegacyXml ( array $data ) : string Returns the XML required by the legacy database.
fillXml ( array $imageData, array $pathInfo, integer $timestamp ) : string Fill the XML template with the data provided.
parseLegacyXml ( string $xml ) : array Parses the XML from the legacy database.

Method Details

__construct() public method

public __construct ( eZ\Publish\Core\IO\IOServiceInterface $imageIoService, eZ\Publish\Core\IO\UrlRedecorator $urlRedecorator )
$imageIoService eZ\Publish\Core\IO\IOServiceInterface
$urlRedecorator eZ\Publish\Core\IO\UrlRedecorator

createEmptyLegacyXml() protected method

Creates an XML considered "empty" by the legacy storage.
protected createEmptyLegacyXml ( array $contentMetaData ) : string
$contentMetaData array
return string

createLegacyXml() protected method

Returns the XML required by the legacy database.
protected createLegacyXml ( array $data ) : string
$data array
return string

fillXml() protected method

Fill the XML template with the data provided.
protected fillXml ( array $imageData, array $pathInfo, integer $timestamp ) : string
$imageData array
$pathInfo array
$timestamp integer
return string

getIndexColumn() public method

Returns the name of the index column the datatype uses, which is either "sort_key_int" or "sort_key_string". This column is then used for filtering and sorting for this type.
public getIndexColumn ( ) : string
return string

parseLegacyXml() protected method

Returns only the data required by the FieldType, nothing more.
protected parseLegacyXml ( string $xml ) : array
$xml string
return array

toFieldDefinition() public method

Converts field definition data in $storageDef into $fieldDef.
public toFieldDefinition ( StorageFieldDefinition $storageDef, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef )
$storageDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition
$fieldDef eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition

toFieldValue() public method

Converts data from $value to $fieldValue.
public toFieldValue ( StorageFieldValue $value, eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue )
$value eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue
$fieldValue eZ\Publish\SPI\Persistence\Content\FieldValue

toStorageFieldDefinition() public method

Converts field definition data in $fieldDef into $storageFieldDef.
public toStorageFieldDefinition ( eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef, StorageFieldDefinition $storageDef )
$fieldDef eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$storageDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition

toStorageValue() public method

Converts data from $value to $storageFieldValue.
public toStorageValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $value, StorageFieldValue $storageFieldValue )
$value eZ\Publish\SPI\Persistence\Content\FieldValue
$storageFieldValue eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue