avg() public méthode

Returns the average value of 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.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/avg/
public avg ( mixed | self $expression )
$expression mixed | self
Exemple #1
0
 /**
  * Returns the average value of 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.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/avg/
  * @see Expr::avg
  * @param mixed|Expr $expression
  * @return Operator
  */
 public function avg($expression)
 {
     $this->expr->avg($expression);
     return $this;
 }