pushAll() public method

If the field does not exist, it will be set to an array containing the values in the argument. If the field is not an array, the query will yield an error. This operator is deprecated in MongoDB 2.4. {@link Expr::push()} and {@link Expr::each()} should be used in its place.
See also: Builder::pushAll()
See also: http://docs.mongodb.org/manual/reference/operator/pushAll/
public pushAll ( array $values )
$values array
Esempio n. 1
0
 /**
  * Append multiple values to the current array field.
  *
  * If the field does not exist, it will be set to an array containing the
  * values in the argument. If the field is not an array, the query will
  * yield an error.
  *
  * This operator is deprecated in MongoDB 2.4. {@link Builder::push()} and
  * {@link Expr::each()} should be used in its place.
  *
  * @see Expr::pushAll()
  * @see http://docs.mongodb.org/manual/reference/operator/pushAll/
  * @param array $values
  * @return self
  */
 public function pushAll(array $values)
 {
     $this->expr->pushAll($values);
     return $this;
 }