Метод |
Описание |
|
__construct ( array $config = [] ) |
Constructor |
|
alias ( string $alias = null ) : string |
Get the alias for this Type. |
|
callFinder ( string $type, Query $query, array $options = [] ) : Query |
Calls a finder method directly and applies it to the passed query,
if no query is passed a new one will be created and returned |
|
connection ( Connection $conn = null ) : Connection |
Returns the connection instance or sets a new one |
|
defaultConnectionName ( ) : string |
The default connection name to inject when creating an instance. |
|
delete ( Cake\Datasource\EntityInterface $entity, array $options = [] ) : boolean |
Delete a single entity. |
|
deleteAll ( array $conditions ) : boolean |
Delete all matching records. |
|
embedMany ( string $name, array $options = [] ) : void |
Mark a property in documents of this type as list of embedded sub-documents. |
|
embedOne ( string $name, array $options = [] ) : void |
Mark a property in documents of this type as an embedded sub-document. |
|
embedded ( ) : array |
Get the list of embedded documents this type has. |
|
entityClass ( string $name = null ) : string |
Returns the class used to hydrate rows for this table or sets
a new one |
|
exists ( array $conditions ) : boolean |
Returns true if there is any record in this repository matching the specified
conditions. |
|
find ( string $type = 'all', array $options = [] ) : Query |
Creates a new Query for this repository and applies some defaults based on the
type of search that was selected. |
|
findAll ( Query $query, array $options = [] ) : Query |
Returns the query as passed |
|
get ( string $primaryKey, array $options = [] ) : Document |
|
|
getEventManager ( ) : Cake\Event\EventManager |
Get the event manager for this Table. |
|
hasField ( string $field ) : boolean |
Check whether or not a field exists in the mapping. |
|
implementedEvents ( ) : array |
Get the callbacks this Type is interested in. |
|
initialize ( array $config ) : void |
Initialize a table instance. Called after the constructor. |
|
marshaller ( ) : Marshaller |
Get a marshaller for this Type instance. |
|
name ( string $name = null ) : string |
Returns the type name name or sets a new one |
|
newEntities ( array $data, array $options = [] ) : array |
Create a list of entities + associated entities from an array. |
|
newEntity ( array | null $data = null, array $options = [] ) : Cake\Datasource\EntityInterface |
Create a new entity + associated entities from an array. |
|
patchEntities ( array | Traversable $entities, array $data, array $options = [] ) : array |
Merges each of the elements passed in $data into the entities
found in $entities respecting the accessible fields configured on the entities. |
|
patchEntity ( Cake\Datasource\EntityInterface $entity, array $data, array $options = [] ) : Cake\Datasource\EntityInterface |
Merges the passed $data into $entity respecting the accessible
fields configured on the entity. Returns the same entity after being
altered. |
|
query ( ) : Query |
Creates a new Query instance for this repository |
|
save ( Cake\Datasource\EntityInterface $entity, array $options = [] ) : Cake\Datasource\EntityInterface | boolean |
Persists an entity based on the fields that are marked as dirty and
returns the same entity after a successful save or false in case
of any error. |
|
schema ( ) : array |
Get the mapping data from the index type. |
|
table ( string $table = null ) : string |
Get/set the type/table name for this type. |
|
updateAll ( array $fields, array $conditions ) : void |
Update all matching records. |
|