PHP 클래스 Doctrine\ODM\CouchDB\Mapping\EmbeddedDocumentSerializer

부터: 1.0
저자: Bartfai Tamas ([email protected])
파일 보기 프로젝트 열기: doctrine/couchdb-odm

공개 메소드들

메소드 설명
__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