Doctrine\MongoDB\Aggregation\Stage::sort PHP Method

sort() public method

If sorting by multiple fields, the first argument should be an array of field name (key) and order (value) pairs.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/sort/
public sort ( array | string $fieldName, integer | string $order = null ) : Doctrine\MongoDB\Aggregation\Stage\Sort
$fieldName array | string Field name or array of field/order pairs
$order integer | string Field order (if one field is specified)
return Doctrine\MongoDB\Aggregation\Stage\Sort
    public function sort($fieldName, $order = null)
    {
        return $this->builder->sort($fieldName, $order);
    }