PHP Class Doctrine\MongoDB\Aggregation\Stage\Operator

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

Protected Properties

Property Type Description
$expr Doctrine\MongoDB\Aggregation\Expr

Public Methods

Method Description
__construct ( Builder $builder )
abs ( mixed | Expr $number ) Returns the absolute value of a number.
add ( mixed | Expr $expression1, mixed | Expr $expression2 ) Adds numbers together or adds numbers and a date. If one of the arguments is a date, $add treats the other arguments as milliseconds to add to the date.
addAnd ( array | Expr $expression ) Add one or more $and clauses to the current expression.
addOr ( array | Expr $expression ) Add one or more $or clauses to the current expression.
allElementsTrue ( mixed | Expr $expression ) Evaluates an array as a set and returns true if no element in the array is false. Otherwise, returns false. An empty array returns true.
anyElementTrue ( array | Expr $expression ) Evaluates an array as a set and returns true if any of the elements are true and false otherwise. An empty array returns false.
arrayElemAt ( mixed | Expr $array, mixed | Expr $index ) Returns the element at the specified array index.
ceil ( mixed | Expr $number ) Returns the smallest integer greater than or equal to the specified number.
cmp ( mixed | Expr $expression1, mixed | Expr $expression2 ) Compares two values and returns: -1 if the first value is less than the second.
concat ( mixed | Expr $expression1, mixed | Expr $expression2 ) Concatenates strings and returns the concatenated string.
concatArrays ( mixed | Expr $array1, mixed | Expr $array2 ) Concatenates arrays to return the concatenated array.
cond ( mixed | Expr $if, mixed | Expr $then, mixed | Expr $else ) Evaluates a boolean expression to return one of the two specified return expressions.
dateToString ( string $format, mixed | Expr $expression ) Converts a date object to a string according to a user-specified format.
dayOfMonth ( mixed | Expr $expression ) Returns the day of the month for a date as a number between 1 and 31.
dayOfWeek ( mixed | Expr $expression ) Returns the day of the week for a date as a number between 1 (Sunday) and 7 (Saturday).
dayOfYear ( mixed | Expr $expression ) Returns the day of the year for a date as a number between 1 and 366.
divide ( mixed | Expr $expression1, mixed | Expr $expression2 ) Divides one number by another and returns the result. The first argument is divided by the second argument.
eq ( mixed | Expr $expression1, mixed | Expr $expression2 ) Compares two values and returns whether they are equivalent.
exp ( mixed | Expr $exponent ) Raises Euler’s number to the specified exponent and returns the result.
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.
filter ( mixed | Expr $input, mixed | Expr $as, mixed | Expr $cond ) Selects a subset of the array to return based on the specified condition.
floor ( mixed | Expr $number ) Returns the largest integer less than or equal to the specified number.
gt ( mixed | Expr $expression1, mixed | Expr $expression2 ) Compares two values and returns: true when the first value is greater than the second value.
gte ( mixed | Expr $expression1, mixed | Expr $expression2 ) Compares two values and returns: true when the first value is greater than or equivalent to the second value.
hour ( mixed | Expr $expression ) Returns the hour portion of a date as a number between 0 and 23.
ifNull ( mixed | Expr $expression, mixed | Expr $replacementExpression ) Evaluates an expression and returns the value of the expression if the expression evaluates to a non-null value. If the expression evaluates to a null value, including instances of undefined values or missing fields, returns the value of the replacement expression.
isArray ( mixed | Expr $expression ) Determines if the operand is an array. Returns a boolean.
let ( mixed | Expr $vars, mixed | Expr $in ) Binds variables for use in the specified expression, and returns the result of the expression.
literal ( mixed | Expr $value ) Returns a value without parsing. Use for values that the aggregation pipeline may interpret as an expression.
ln ( mixed | Expr $number ) Calculates the natural logarithm ln (i.e loge) of a number and returns the result as a double.
log ( mixed | Expr $number, mixed | Expr $base ) Calculates the log of a number in the specified base and returns the result as a double.
log10 ( mixed | Expr $number ) Calculates the log base 10 of a number and returns the result as a double.
lt ( mixed | Expr $expression1, mixed | Expr $expression2 ) Compares two values and returns: true when the first value is less than the second value.
lte ( mixed | Expr $expression1, mixed | Expr $expression2 ) Compares two values and returns: true when the first value is less than or equivalent to the second value.
map ( mixed | Expr $input, string $as, mixed | Expr $in ) Applies an expression to each item in an array and returns an array with the applied results.
meta ( $metaDataKeyword ) Returns the metadata associated with a document in a pipeline operations.
millisecond ( mixed | Expr $expression ) Returns the millisecond portion of a date as an integer between 0 and 999.
minute ( mixed | Expr $expression ) Returns the minute portion of a date as a number between 0 and 59.
mod ( mixed | Expr $expression1, mixed | Expr $expression2 ) Divides one number by another and returns the remainder. The first argument is divided by the second argument.
month ( mixed | Expr $expression ) Returns the month of a date as a number between 1 and 12.
multiply ( mixed | Expr $expression1, mixed | Expr $expression2 ) Multiplies numbers together and returns the result.
ne ( mixed | Expr $expression1, mixed | Expr $expression2 ) Compares two values and returns: true when the values are not equivalent.
not ( mixed | Expr $expression ) Evaluates a boolean and returns the opposite boolean value.
pow ( mixed | Expr $number, mixed | Expr $exponent ) Raises a number to the specified exponent and returns the result.
second ( mixed | Expr $expression ) Returns the second portion of a date as a number between 0 and 59, but can be 60 to account for leap seconds.
setDifference ( mixed | Expr $expression1, mixed | Expr $expression2 ) Takes two sets and returns an array containing the elements that only exist in the first set.
setEquals ( mixed | Expr $expression1, mixed | Expr $expression2 ) Compares two or more arrays and returns true if they have the same distinct elements and false otherwise.
setIntersection ( mixed | Expr $expression1, mixed | Expr $expression2 ) Takes two or more arrays and returns an array that contains the elements that appear in every input array.
setIsSubset ( mixed | Expr $expression1, mixed | Expr $expression2 ) Takes two arrays and returns true when the first array is a subset of the second, including when the first array equals the second array, and false otherwise.
setUnion ( mixed | Expr $expression1, mixed | Expr $expression2 ) Takes two or more arrays and returns an array containing the elements that appear in any input array.
size ( mixed | Expr $expression ) Counts and returns the total the number of items in an array.
slice ( mixed | Expr $array, mixed | Expr $n, mixed | Expr | null $position = null ) Returns a subset of an array.
sqrt ( mixed | Expr $expression ) Calculates the square root of a positive number and returns the result as a double.
strcasecmp ( mixed | Expr $expression1, mixed | Expr $expression2 ) Performs case-insensitive comparison of two strings. Returns 1 if first string is “greater than” the second string.
substr ( mixed | Expr $string, mixed | Expr $start, mixed | Expr $length ) Returns a substring of a string, starting at a specified index position and including the specified number of characters. The index is zero-based.
subtract ( mixed | Expr $expression1, mixed | Expr $expression2 ) Subtracts two numbers to return the difference. The second argument is subtracted from the first argument.
toLower ( mixed | Expr $expression ) Converts a string to lowercase, returning the result.
toUpper ( mixed | Expr $expression ) Converts a string to uppercase, returning the result.
trunc ( mixed | Expr $number ) Truncates a number to its integer.
week ( mixed | Expr $expression ) Returns the week of the year for a date as a number between 0 and 53.
year ( mixed | Expr $expression ) Returns the year portion of a date.

Method Details

__construct() public method

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

abs() public method

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

add() public method

The arguments can be any valid expression as long as they resolve to either all numbers or to numbers and a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/add/
See also: Expr::add
public add ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

addAnd() public method

Add one or more $and clauses to the current expression.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/and/
See also: Expr::addAnd
public addAnd ( array | Expr $expression )
$expression array | Doctrine\MongoDB\Aggregation\Expr

addOr() public method

Add one or more $or clauses to the current expression.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/or/
See also: Expr::addOr
public addOr ( array | Expr $expression )
$expression array | Doctrine\MongoDB\Aggregation\Expr

allElementsTrue() public method

The expression must resolve to an array.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/allElementsTrue/
See also: Expr::allElementsTrue
public allElementsTrue ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

anyElementTrue() public method

The expression must resolve to an array.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/anyElementTrue/
See also: Expr::anyElementTrue
public anyElementTrue ( array | Expr $expression )
$expression array | Doctrine\MongoDB\Aggregation\Expr

arrayElemAt() public method

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

ceil() public method

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

cmp() public method

1 if the first value is greater than the second. 0 if the two values are equivalent.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/cmp/
See also: Expr::cmp
public cmp ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

concat() public method

The arguments can be any valid expression as long as they resolve to strings. If the argument resolves to a value of null or refers to a field that is missing, $concat returns null.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/concat/
See also: Expr::concat
public concat ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

concatArrays() public method

The expressions can be any valid expression as long as they resolve to an array.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/concatArrays/
See also: Expr::concatArrays
Since: 1.3
public concatArrays ( mixed | Expr $array1, mixed | Expr $array2 )
$array1 mixed | Doctrine\MongoDB\Aggregation\Expr
$array2 mixed | Doctrine\MongoDB\Aggregation\Expr

cond() public method

The arguments can be any valid expression.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/cond/
See also: Expr::cond
public cond ( mixed | Expr $if, mixed | Expr $then, mixed | Expr $else )
$if mixed | Doctrine\MongoDB\Aggregation\Expr
$then mixed | Doctrine\MongoDB\Aggregation\Expr
$else mixed | Doctrine\MongoDB\Aggregation\Expr

dateToString() public method

The format string can be any string literal, containing 0 or more format specifiers. The date argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/dateToString/
See also: Expr::dateToString
public dateToString ( string $format, mixed | Expr $expression )
$format string
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

dayOfMonth() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/dayOfMonth/
See also: Expr::dayOfMonth
public dayOfMonth ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

dayOfWeek() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/dayOfWeek/
See also: Expr::dayOfWeek
public dayOfWeek ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

dayOfYear() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/dayOfYear/
See also: Expr::dayOfYear
public dayOfYear ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

divide() public method

The arguments can be any valid expression as long as the resolve to numbers.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/divide/
See also: Expr::divide
public divide ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

eq() public method

Compares two values and returns whether they are equivalent.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/eq/
See also: Expr::eq
public eq ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

exp() public method

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

expression() public method

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 method

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

filter() public method

Returns an array with only those elements that match the condition. The returned elements are in the original order.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/filter/
See also: Expr::filter
Since: 1.3
public filter ( mixed | Expr $input, mixed | Expr $as, mixed | Expr $cond )
$input mixed | Doctrine\MongoDB\Aggregation\Expr
$as mixed | Doctrine\MongoDB\Aggregation\Expr
$cond mixed | Doctrine\MongoDB\Aggregation\Expr

floor() public method

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

gt() public method

false when the first value is less than or equivalent to the second value.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/gt/
See also: Expr::gt
public gt ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

gte() public method

false when the first value is less than the second value.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/gte/
See also: Expr::gte
public gte ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

hour() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/hour/
See also: Expr::hour
public hour ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

ifNull() public method

The arguments can be any valid expression.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/ifNull/
See also: Expr::ifNull
public ifNull ( mixed | Expr $expression, mixed | Expr $replacementExpression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
$replacementExpression mixed | Doctrine\MongoDB\Aggregation\Expr

isArray() public method

The can be any valid expression.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/isArray/
See also: Expr::isArray
Since: 1.3
public isArray ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

let() public method

Binds variables for use in the specified expression, and returns the result of the expression.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/let/
See also: Expr::let
public let ( mixed | Expr $vars, mixed | Expr $in )
$vars mixed | Doctrine\MongoDB\Aggregation\Expr Assignment block for the variables accessible in the in expression. To assign a variable, specify a string for the variable name and assign a valid expression for the value.
$in mixed | Doctrine\MongoDB\Aggregation\Expr The expression to evaluate.

literal() public method

Returns a value without parsing. Use for values that the aggregation pipeline may interpret as an expression.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/literal/
See also: Expr::literal
public literal ( mixed | Expr $value )
$value mixed | Doctrine\MongoDB\Aggregation\Expr

ln() public method

The expression can be any valid expression as long as it resolves to a non-negative number.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/log/
See also: Expr::ln
Since: 1.3
public ln ( mixed | Expr $number )
$number mixed | Doctrine\MongoDB\Aggregation\Expr

log() public method

The expression can be any valid expression as long as it resolves to a non-negative number. The expression can be any valid expression as long as it resolves to a positive number greater than 1.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/log/
See also: Expr::log
Since: 1.3
public log ( mixed | Expr $number, mixed | Expr $base )
$number mixed | Doctrine\MongoDB\Aggregation\Expr
$base mixed | Doctrine\MongoDB\Aggregation\Expr

log10() public method

The expression can be any valid expression as long as it resolves to a non-negative number. The expression can be any valid expression as long as it resolves to a positive number greater than 1.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/log/
See also: Expr::log10
Since: 1.3
public log10 ( mixed | Expr $number )
$number mixed | Doctrine\MongoDB\Aggregation\Expr

lt() public method

false when the first value is greater than or equivalent to the second value.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/lt/
See also: Expr::lt
public lt ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

lte() public method

false when the first value is greater than the second value.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/lte/
See also: Expr::lte
public lte ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

map() public method

Applies an expression to each item in an array and returns an array with the applied results.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/map/
See also: Expr::map
public map ( mixed | Expr $input, string $as, mixed | Expr $in )
$input mixed | Doctrine\MongoDB\Aggregation\Expr An expression that resolves to an array.
$as string The variable name for the items in the input array. The in expression accesses each item in the input array by this variable.
$in mixed | Doctrine\MongoDB\Aggregation\Expr The expression to apply to each item in the input array. The expression accesses the item by its variable name.

meta() public method

Returns the metadata associated with a document in a pipeline operations.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/meta/
See also: Expr::meta
public meta ( $metaDataKeyword )
$metaDataKeyword

millisecond() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/millisecond/
See also: Expr::millisecond
public millisecond ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

minute() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/minute/
See also: Expr::minute
public minute ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

mod() public method

The arguments can be any valid expression as long as they resolve to numbers.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/mod/
See also: Expr::mod
public mod ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

month() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/month/
See also: Expr::month
public month ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

multiply() public method

The arguments can be any valid expression as long as they resolve to numbers.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/multiply/
See also: Expr::multiply
public multiply ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

ne() public method

false when the values are equivalent.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/ne/
See also: Expr::ne
public ne ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

not() public method

Evaluates a boolean and returns the opposite boolean value.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/not/
See also: Expr::not
public not ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

pow() public method

The expression can be any valid expression as long as it resolves to a non-negative number. The expression can be any valid expression as long as it resolves to a number.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/pow/
See also: Expr::pow
Since: 1.3
public pow ( mixed | Expr $number, mixed | Expr $exponent )
$number mixed | Doctrine\MongoDB\Aggregation\Expr
$exponent mixed | Doctrine\MongoDB\Aggregation\Expr

second() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/second/
See also: Expr::second
public second ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

setDifference() public method

The arguments can be any valid expression as long as they each resolve to an array.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/setDifference/
See also: Expr::setDifference
public setDifference ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

setEquals() public method

The arguments can be any valid expression as long as they each resolve to an array.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/setEquals/
See also: Expr::setEquals
public setEquals ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

setIntersection() public method

The arguments can be any valid expression as long as they each resolve to an array.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/setIntersection/
See also: Expr::setIntersection
public setIntersection ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

setIsSubset() public method

The arguments can be any valid expression as long as they each resolve to an array.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/setIsSubset/
See also: Expr::setIsSubset
public setIsSubset ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

setUnion() public method

The arguments can be any valid expression as long as they each resolve to an array.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/setUnion/
See also: Expr::setUnion
public setUnion ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

size() public method

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

slice() public method

Returns a subset of an array.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/slice/
See also: Expr::slice
Since: 1.3
public slice ( mixed | Expr $array, mixed | Expr $n, mixed | Expr | null $position = null )
$array mixed | Doctrine\MongoDB\Aggregation\Expr
$n mixed | Doctrine\MongoDB\Aggregation\Expr
$position mixed | Doctrine\MongoDB\Aggregation\Expr | null

sqrt() public method

The argument can be any valid expression as long as it resolves to a non-negative number.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/sqrt/
See also: Expr::sqrt
public sqrt ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

strcasecmp() public method

0 if the two strings are equal. -1 if the first string is “less than” the second string. The arguments can be any valid expression as long as they resolve to strings.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/strcasecmp/
See also: Expr::strcasecmp
public strcasecmp ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

substr() public method

The arguments can be any valid expression as long as long as the first argument resolves to a string, and the second and third arguments resolve to integers.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/substr/
See also: Expr::substr
public substr ( mixed | Expr $string, mixed | Expr $start, mixed | Expr $length )
$string mixed | Doctrine\MongoDB\Aggregation\Expr
$start mixed | Doctrine\MongoDB\Aggregation\Expr
$length mixed | Doctrine\MongoDB\Aggregation\Expr

subtract() public method

The arguments can be any valid expression as long as they resolve to numbers and/or dates.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/subtract/
See also: Expr::subtract
public subtract ( mixed | Expr $expression1, mixed | Expr $expression2 )
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
$expression2 mixed | Doctrine\MongoDB\Aggregation\Expr

toLower() public method

The argument can be any expression as long as it resolves to a string.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/toLower/
See also: Expr::toLower
public toLower ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

toUpper() public method

The argument can be any expression as long as it resolves to a string.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/toUpper/
See also: Expr::toUpper
public toUpper ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

trunc() public method

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

week() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/week/
See also: Expr::week
public week ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

year() public method

The argument can be any expression as long as it resolves to a date.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/year/
See also: Expr::year
public year ( mixed | Expr $expression )
$expression mixed | Doctrine\MongoDB\Aggregation\Expr

Property Details

$expr protected_oe property

protected Expr,Doctrine\MongoDB\Aggregation $expr
return Doctrine\MongoDB\Aggregation\Expr