Mongolid\DataMapper\DataMapper::where PHP Метод

where() публичный Метод

Retrieve a database cursor that will return $this->schema->entityClass objects that upon iteration.
public where ( mixed $query = [], array $projection = [], boolean $cacheable = false ) : Cursor
$query mixed MongoDB query to retrieve documents.
$projection array Fields to project in Mongo query.
$cacheable boolean Retrieves a CacheableCursor instead.
Результат Mongolid\Cursor\Cursor
    public function where($query = [], array $projection = [], bool $cacheable = false) : Cursor
    {
        $cursorClass = $cacheable ? CacheableCursor::class : Cursor::class;
        $cursor = new $cursorClass($this->schema, $this->getCollection(), 'find', [$this->prepareValueQuery($query), ['projection' => $this->prepareProjection($projection)]]);
        return $cursor;
    }