Doctrine\MongoDB\Aggregation\Stage\Group::first PHP Method

first() public method

Returns the value that results from applying an expression to the first document in a group of documents that share the same group by key. Only meaningful when documents are in a defined order.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/first/
See also: Expr::first
public first ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
return Operator
    public function first($expression)
    {
        $this->expr->first($expression);
        return $this;
    }