Maslosoft Mangan API
Trait FinderTrait
Finder trait contains implementation of FinderInterface, and it forwards
them to concrete Finder class. Finder used by this trait
can be defined via Finder annotation.
This trait could be used as a part of active document class.
Direct Known Users
Indirect Known Users
Maslosoft\Mangan\Example\ExampleUser,
Maslosoft\Mangan\Model\Trash,
Maslosoft\Mangan\Model\TrashItem
See:
Maslosoft\Mangan\Interfaces\FinderInterfaceAuthor: Piotr Maselkowski
Located at Traits/FinderTrait.php
Methods summary
public
Maslosoft\Addendum\Interfaces\AnnotatedInterface|
|
#
find( array|
Finds a single Document with the specified condition. |
public
Maslosoft\Addendum\Interfaces\AnnotatedInterface|
|
#
findByPk( mixed $pk, array|
Finds document with the specified primary key. Primary key by default
is defined by |
public
Maslosoft\Addendum\Interfaces\AnnotatedInterface|
|
#
findByAttributes( array $attributes )
Finds document with the specified attributes. Attributes should be specified as key-value pairs. This allows easier syntax for simple queries. |
public
Maslosoft\Addendum\Interfaces\AnnotatedInterface|
|
#
findAll( array|
Finds all documents satisfying the specified condition. |
public
Maslosoft\Addendum\Interfaces\AnnotatedInterface|
|
|
public
Maslosoft\Addendum\Interfaces\AnnotatedInterface|
|
#
findAllByPk( mixed $pk, array|
Finds all documents with the specified primary keys.
In MongoDB world every document has '_id' unique field, so with this method that
field is in use as PK by default.
See |
public
integer
|
#
count( array|
Counts all documents satisfying the specified condition. |
public
integer
|
|
public
boolean
|
#
exists(
Checks whether there is document satisfying the specified condition. |
public
|