프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$type | Type instance this marshaller is for. |
메소드 | 설명 | |
---|---|---|
__construct ( Type $type ) | Constructor | |
many ( array $data, array $options = [] ) : array | Hydrate a collection of entities. | |
merge ( Cake\Datasource\EntityInterface $entity, array $data, array $options = [] ) : Cake\Datasource\EntityInterface | Merges $data into $document. | |
mergeMany ( array $entities, array $data, array $options = [] ) : array | Update a collection of entities. | |
one ( array $data, array $options = [] ) : Cake\ElasticSearch\Document; | Hydrate a single document. |
메소드 | 설명 | |
---|---|---|
_prepareDataAndOptions ( array $data, array $options ) : array | Returns data and options prepared to validate and marshall. | |
_validate ( array $data, array $options, boolean $isNew ) : array | Returns the validation errors for a data set based on the passed options | |
mergeNested ( |
Merge an embedded document. | |
newNested ( |
Marshal an embedded document. |
public __construct ( Type $type ) | ||
$type | Type | The type instance this marshaller is for. |
public merge ( Cake\Datasource\EntityInterface $entity, array $data, array $options = [] ) : Cake\Datasource\EntityInterface | ||
$entity | Cake\Datasource\EntityInterface | the entity that will get the data merged in |
$data | array | key value list of fields to be merged into the entity |
$options | array | List of options. |
리턴 | Cake\Datasource\EntityInterface |
protected mergeNested ( |
||
$embed | The embed definition. | |
$existing | The existing entity or entities. | |
$data | array | The data to marshal |
리턴 | array | |
Either a document or an array of documents. |