PHP Class Doctrine\MongoDB\Aggregation\Stage\Group

Since: 1.2
Author: alcaeus ([email protected])
Inheritance: extends Doctrine\MongoDB\Aggregation\Stage
Afficher le fichier Open project: doctrine/mongodb Class Usage Examples

Protected Properties

Свойство Type Description
$expr Doctrine\MongoDB\Aggregation\Expr

Méthodes publiques

Méthode Description
__construct ( Builder $builder )
addToSet ( mixed | Expr $expression ) : Operator Returns an array of all unique values that results from applying an expression to each document in a group of documents that share the same group by key. Order of the elements in the output array is unspecified.
avg ( mixed | Expr $expression ) : Operator 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.
expression ( mixed | Expr $value ) Used to use an expression as field value. Can be any expression
field ( string $fieldName ) Set the current field for building the expression.
first ( mixed | Expr $expression ) : Operator 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.
getExpression ( )
last ( mixed | Expr $expression ) : Operator Returns the value that results from applying an expression to the last document in a group of documents that share the same group by a field.
max ( mixed | Expr $expression ) : Operator Returns the highest value that results from applying an expression to each document in a group of documents that share the same group by key.
min ( mixed | Expr $expression ) : Operator Returns the lowest value that results from applying an expression to each document in a group of documents that share the same group by key.
push ( mixed | Expr $expression ) : Operator Returns an array of all values that result from applying an expression to each document in a group of documents that share the same group by key.
stdDevPop ( mixed | Expr $expression ) Calculates the population standard deviation of the input values.
stdDevSamp ( mixed | Expr $expression ) Calculates the sample standard deviation of the input values.
sum ( mixed | Expr $expression ) : Operator 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.

Method Details

__construct() public méthode

public __construct ( Builder $builder )
$builder Doctrine\MongoDB\Aggregation\Builder

addToSet() public méthode

AddToSet is an accumulator operation only available in the group stage.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/addToSet/
See also: Expr::addToSet
public addToSet ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
Résultat Operator

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/
See also: Expr::avg
public avg ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
Résultat Operator

expression() public méthode

Used to use an expression as field value. Can be any expression
See also: http://docs.mongodb.org/manual/meta/aggregation-quick-reference/#aggregation-expressions
See also: Expr::expression
public expression ( mixed | Expr $value )
$value mixed | Doctrine\MongoDB\Aggregation\Expr

field() public méthode

Set the current field for building the expression.
See also: Expr::field
public field ( string $fieldName )
$fieldName string

first() public méthode

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
Résultat Operator

getExpression() public méthode

public getExpression ( )

last() public méthode

Only meaningful when documents are in a defined order.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/last/
See also: Expr::last
public last ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
Résultat Operator

max() public méthode

Returns the highest value that results from applying an expression to each document in a group of documents that share the same group by key.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/max/
See also: Expr::max
public max ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
Résultat Operator

min() public méthode

Returns the lowest value that results from applying an expression to each document in a group of documents that share the same group by key.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/min/
See also: Expr::min
public min ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
Résultat Operator

push() public méthode

Returns an array of all values that result from applying an expression to each document in a group of documents that share the same group by key.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/push/
See also: Expr::push
public push ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
Résultat Operator

stdDevPop() public méthode

The argument can be any expression as long as it resolves to an array.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/stdDevPop/
See also: Expr::stdDevPop
Since: 1.3
public stdDevPop ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

stdDevSamp() public méthode

The argument can be any expression as long as it resolves to an array.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/stdDevSamp/
See also: Expr::stdDevSamp
Since: 1.3
public stdDevSamp ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

sum() public méthode

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.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/sum/
See also: Expr::sum
public sum ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
Résultat Operator

Property Details

$expr protected_oe property

protected Expr,Doctrine\MongoDB\Aggregation $expr
Résultat Doctrine\MongoDB\Aggregation\Expr