PHP Класс Doctrine\ODM\CouchDB\Mapping\EmbeddedDocumentSerializer

С версии: 1.0
Автор: Bartfai Tamas ([email protected])
Показать файл Открыть проект

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

Метод Описание
__construct ( $metadataFactory, $metadataResolver )
createEmbeddedDocument ( array $data, object $embeddedFieldMapping ) : object Create a document for an embedded document field mapping from json data.
doCreateEmbeddedDocument ( $data, $embeddedFieldMapping )
isChanged ( array $value, object $originalData, array $valueFieldMapping ) : boolean Compares the two representation of an embedded document.
serializeEmbeddedDocument ( object $embeddedValue, array $embeddedFieldMapping, $embedMany = false ) : array Serializes an embedded document value into array given the mapping metadata for the class.

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

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

public __construct ( $metadataFactory, $metadataResolver )

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

Create a document for an embedded document field mapping from json data.
public createEmbeddedDocument ( array $data, object $embeddedFieldMapping ) : object
$data array
$embeddedFieldMapping object
Результат object

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

public doCreateEmbeddedDocument ( $data, $embeddedFieldMapping )

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

If the original misses doctrine_metadata, but the values are the same, we assume there is no change If the original has doctrine_metadata, and the new value has different class, that's a change, even if the values are the same.
public isChanged ( array $value, object $originalData, array $valueFieldMapping ) : boolean
$value array
$originalData object
$valueFieldMapping array Mapping of the field that contains the embedded document in the embedder document.
Результат boolean

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

Serializes an embedded document value into array given the mapping metadata for the class.
public serializeEmbeddedDocument ( object $embeddedValue, array $embeddedFieldMapping, $embedMany = false ) : array
$embeddedValue object
$embeddedFieldMapping array
$embedMany
Результат array