Doctrine\MongoDB\Aggregation\Stage\Project::sum PHP Метод

sum() публичный Метод

Calculates and returns the sum of all the numeric values that result from applying a specified expression to each document in a group of documents that share the same group by key. Ignores nun-numeric values.
См. также: http://docs.mongodb.org/manual/reference/operator/aggregation/sum/
См. также: Expr::sum
С версии: 1.3
public sum ( mixed | Expr $expression1 ) : Operator
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
Результат Operator
    public function sum($expression1)
    {
        $this->expr->sum(func_num_args() === 1 ? $expression1 : func_get_args());
        return $this;
    }