Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
Mongolid
Cursor
CursorInterface
sort
Mongolid\Cursor\CursorInterface::sort PHP Method
CursorInterface Interface Documentation
Show file
Open project: leroy-merlin-br/mongolid
sort()
public
method
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.
return
Mongolid\Cursor\CursorInterface
Returns this cursor.
public function sort(array $fields);
CursorInterface
all
count
first
limit
skip
sort
toArray