Property | Type | Description | |
---|---|---|---|
$type | Type instance this marshaller is for. |
Method | Description | |
---|---|---|
__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. |
Method | Description | |
---|---|---|
_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. |
return | Cake\Datasource\EntityInterface |
protected mergeNested ( |
||
$embed | The embed definition. | |
$existing | The existing entity or entities. | |
$data | array | The data to marshal |
return | array | |
Either a document or an array of documents. |