PHP Класс eZ\Publish\Core\Persistence\Legacy\Content\Mapper

Performs mapping of Content objects.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$converterRegistry eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry FieldValue converter registry.
$languageHandler eZ\Publish\SPI\Persistence\Content\Language\Handler Caching language handler.

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

Метод Описание
__construct ( ConverterRegistry $converterRegistry, eZ\Publish\SPI\Persistence\Content\Language\Handler $languageHandler ) Creates a new mapper.
convertToStorageValue ( eZ\Publish\SPI\Persistence\Content\Field $field ) : StorageFieldValue Converts value of $field to storage value.
createCreateStructFromContent ( eZ\Publish\SPI\Persistence\Content $content ) : eZ\Publish\SPI\Persistence\Content\CreateStruct Creates CreateStruct from $content.
createRelationFromCreateStruct ( eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct $struct ) : eZ\Publish\SPI\Persistence\Content\Relation Creates a Content from the given $struct.
createVersionInfoForContent ( eZ\Publish\SPI\Persistence\Content $content, mixed $versionNo, mixed $userId ) : eZ\Publish\SPI\Persistence\Content\VersionInfo Creates a new version for the given $content.
createVersionInfoFromCreateStruct ( eZ\Publish\SPI\Persistence\Content\CreateStruct $struct, mixed $versionNo ) : eZ\Publish\SPI\Persistence\Content\VersionInfo Creates a new version for the given $struct and $versionNo.
extractContentFromRows ( array $rows, array $nameRows ) : eZ\Publish\SPI\Persistence\Content[] Extracts Content objects (and nested) from database result $rows.
extractContentInfoFromRow ( array $row, string $prefix = '', string $treePrefix = 'ezcontentobject_tree_' ) : eZ\Publish\SPI\Persistence\Content\ContentInfo Extracts a ContentInfo object from $row.
extractContentInfoFromRows ( array $rows, string $prefix = '', string $treePrefix = 'ezcontentobject_tree_' ) : eZ\Publish\SPI\Persistence\Content\ContentInfo[] Extracts ContentInfo objects from $rows.
extractLanguageIdsFromMask ( integer $languageMask ) : array
extractRelationsFromRows ( array $rows ) Extracts relation objects from $rows.
extractVersionInfoListFromRows ( array $rows, array $nameRows ) : eZ\Publish\SPI\Persistence\Content\VersionInfo[] Extracts a VersionInfo object from $row.

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

Метод Описание
extractFieldFromRow ( array $row ) : eZ\Publish\SPI\Persistence\Content\Field Extracts a Field from $row.
extractFieldValueFromRow ( array $row, string $type ) : eZ\Publish\SPI\Persistence\Content\FieldValue Extracts a FieldValue of $type from $row.
extractRelationFromRow ( array $row ) : eZ\Publish\SPI\Persistence\Content\Relation Extracts a Relation object from a $row.

Приватные методы

Метод Описание
createContentInfoFromCreateStruct ( eZ\Publish\SPI\Persistence\Content\CreateStruct $struct, mixed $currentVersionNo = 1 ) : eZ\Publish\SPI\Persistence\Content\ContentInfo Creates a Content from the given $struct and $currentVersionNo.
extractVersionInfoFromRow ( array $row, array $names = [] ) : eZ\Publish\SPI\Persistence\Content\VersionInfo Extracts a VersionInfo object from $row.

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

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

Creates a new mapper.
public __construct ( ConverterRegistry $converterRegistry, eZ\Publish\SPI\Persistence\Content\Language\Handler $languageHandler )
$converterRegistry eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry
$languageHandler eZ\Publish\SPI\Persistence\Content\Language\Handler

convertToStorageValue() публичный Метод

Converts value of $field to storage value.
public convertToStorageValue ( eZ\Publish\SPI\Persistence\Content\Field $field ) : StorageFieldValue
$field eZ\Publish\SPI\Persistence\Content\Field
Результат StorageFieldValue

createCreateStructFromContent() публичный Метод

Creates CreateStruct from $content.
public createCreateStructFromContent ( eZ\Publish\SPI\Persistence\Content $content ) : eZ\Publish\SPI\Persistence\Content\CreateStruct
$content eZ\Publish\SPI\Persistence\Content
Результат eZ\Publish\SPI\Persistence\Content\CreateStruct

createRelationFromCreateStruct() публичный Метод

Creates a Content from the given $struct.
public createRelationFromCreateStruct ( eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct $struct ) : eZ\Publish\SPI\Persistence\Content\Relation
$struct eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct
Результат eZ\Publish\SPI\Persistence\Content\Relation

createVersionInfoForContent() публичный Метод

Creates a new version for the given $content.
public createVersionInfoForContent ( eZ\Publish\SPI\Persistence\Content $content, mixed $versionNo, mixed $userId ) : eZ\Publish\SPI\Persistence\Content\VersionInfo
$content eZ\Publish\SPI\Persistence\Content
$versionNo mixed
$userId mixed
Результат eZ\Publish\SPI\Persistence\Content\VersionInfo

createVersionInfoFromCreateStruct() публичный Метод

Creates a new version for the given $struct and $versionNo.
public createVersionInfoFromCreateStruct ( eZ\Publish\SPI\Persistence\Content\CreateStruct $struct, mixed $versionNo ) : eZ\Publish\SPI\Persistence\Content\VersionInfo
$struct eZ\Publish\SPI\Persistence\Content\CreateStruct
$versionNo mixed
Результат eZ\Publish\SPI\Persistence\Content\VersionInfo

extractContentFromRows() публичный Метод

Expects database rows to be indexed by keys of the format "$tableName_$columnName"
public extractContentFromRows ( array $rows, array $nameRows ) : eZ\Publish\SPI\Persistence\Content[]
$rows array
$nameRows array
Результат eZ\Publish\SPI\Persistence\Content[]

extractContentInfoFromRow() публичный Метод

Extracts a ContentInfo object from $row.
public extractContentInfoFromRow ( array $row, string $prefix = '', string $treePrefix = 'ezcontentobject_tree_' ) : eZ\Publish\SPI\Persistence\Content\ContentInfo
$row array
$prefix string Prefix for row keys, which are initially mapped by ezcontentobject fields
$treePrefix string Prefix for tree row key, which are initially mapped by ezcontentobject_tree_ fields
Результат eZ\Publish\SPI\Persistence\Content\ContentInfo

extractContentInfoFromRows() публичный Метод

Extracts ContentInfo objects from $rows.
public extractContentInfoFromRows ( array $rows, string $prefix = '', string $treePrefix = 'ezcontentobject_tree_' ) : eZ\Publish\SPI\Persistence\Content\ContentInfo[]
$rows array
$prefix string Prefix for row keys, which are initially mapped by ezcontentobject fields
$treePrefix string Prefix for tree row key, which are initially mapped by ezcontentobject_tree_ fields
Результат eZ\Publish\SPI\Persistence\Content\ContentInfo[]

extractFieldFromRow() защищенный Метод

Extracts a Field from $row.
protected extractFieldFromRow ( array $row ) : eZ\Publish\SPI\Persistence\Content\Field
$row array
Результат eZ\Publish\SPI\Persistence\Content\Field

extractFieldValueFromRow() защищенный Метод

Extracts a FieldValue of $type from $row.
protected extractFieldValueFromRow ( array $row, string $type ) : eZ\Publish\SPI\Persistence\Content\FieldValue
$row array
$type string
Результат eZ\Publish\SPI\Persistence\Content\FieldValue

extractLanguageIdsFromMask() публичный Метод

public extractLanguageIdsFromMask ( integer $languageMask ) : array
$languageMask integer
Результат array

extractRelationFromRow() защищенный Метод

Extracts a Relation object from a $row.
protected extractRelationFromRow ( array $row ) : eZ\Publish\SPI\Persistence\Content\Relation
$row array Associative array representing a relation
Результат eZ\Publish\SPI\Persistence\Content\Relation

extractRelationsFromRows() публичный Метод

Extracts relation objects from $rows.
public extractRelationsFromRows ( array $rows )
$rows array

extractVersionInfoListFromRows() публичный Метод

Extracts a VersionInfo object from $row.
public extractVersionInfoListFromRows ( array $rows, array $nameRows ) : eZ\Publish\SPI\Persistence\Content\VersionInfo[]
$rows array
$nameRows array
Результат eZ\Publish\SPI\Persistence\Content\VersionInfo[]

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

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

FieldValue converter registry.
protected ConverterRegistry,eZ\Publish\Core\Persistence\Legacy\Content\FieldValue $converterRegistry
Результат eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry

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

Caching language handler.
protected Handler,eZ\Publish\SPI\Persistence\Content\Language $languageHandler
Результат eZ\Publish\SPI\Persistence\Content\Language\Handler