PHP 인터페이스 Mongolid\Cursor\CursorInterface

상속: extends Iterato\Iterator
파일 보기 프로젝트 열기: leroy-merlin-br/mongolid

공개 메소드들

메소드 설명
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