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/
public setUnion ( mixed | self $expression1, mixed | self $expression2 )
$expression1 mixed | self
$expression2 mixed | self
Beispiel #1
0
 /**
  * Takes two or more arrays and returns an array containing the elements
  * that appear in any input array.
  *
  * The arguments can be any valid expression as long as they each resolve to an array.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/setUnion/
  * @see Expr::setUnion
  * @param mixed|Expr $expression1
  * @param mixed|Expr $expression2
  * @param mixed|Expr $expression3,...   Additional sets
  * @return $this
  */
 public function setUnion($expression1, $expression2)
 {
     $this->expr->setUnion(...func_get_args());
     return $this;
 }