PHP 클래스 eZ\Publish\Core\Persistence\Legacy\Content\Mapper

Performs mapping of Content objects.
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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