PHP Интерфейс Mongolid\Cursor\CursorInterface

Наследование: extends Iterato\Iterator
Показать файл Открыть проект

Открытые методы

Метод Описание
all ( ) : array Convert the cursor instance to an array of Items.
count ( ) : integer Counts the number of results for this cursor.
first ( ) : mixed Returns the first element of the cursor.
limit ( integer $amount ) : Mongolid\Cursor\CursorInterface Limits the number of results returned.
skip ( integer $amount ) : Mongolid\Cursor\CursorInterface Skips a number of results.
sort ( array $fields ) : Mongolid\Cursor\CursorInterface Sorts the results by given fields.
toArray ( ) : array Return the raw cursor items.

Описание методов

all() публичный метод

Convert the cursor instance to an array of Items.
public all ( ) : array
Результат array

count() публичный метод

Counts the number of results for this cursor.
public count ( ) : integer
Результат integer The number of documents returned by this cursor's query.

first() публичный метод

Returns the first element of the cursor.
public first ( ) : mixed
Результат mixed

limit() публичный метод

Limits the number of results returned.
public limit ( integer $amount ) : Mongolid\Cursor\CursorInterface
$amount integer The number of results to return.
Результат Mongolid\Cursor\CursorInterface Returns this cursor.

skip() публичный метод

Skips a number of results.
public skip ( integer $amount ) : Mongolid\Cursor\CursorInterface
$amount integer The number of results to skip.
Результат Mongolid\Cursor\CursorInterface Returns this cursor.

sort() публичный метод

Sorts the results by given fields.
public sort ( array $fields ) : Mongolid\Cursor\CursorInterface
$fields array An array of fields by which to sort. Each element in the array has as key the field name, and as value either 1 for ascending sort, or -1 for descending sort.
Результат Mongolid\Cursor\CursorInterface Returns this cursor.

toArray() публичный метод

Return the raw cursor items.
public toArray ( ) : array
Результат array