/** * Append one or more values to the current array field. * * If the field does not exist, it will be set to an array containing the * value(s) in the argument. If the field is not an array, the query * will yield an error. * * Multiple values may be specified by providing an Expr object and using * {@link Expr::each()}. {@link Expr::slice()} and {@link Expr::sort()} may * also be used to limit and order array elements, respectively. * * @see Expr::push() * @see http://docs.mongodb.org/manual/reference/operator/push/ * @see http://docs.mongodb.org/manual/reference/operator/each/ * @see http://docs.mongodb.org/manual/reference/operator/slice/ * @see http://docs.mongodb.org/manual/reference/operator/sort/ * @param mixed|Expr $valueOrExpression * @return self */ public function push($valueOrExpression) { $this->expr->push($valueOrExpression); return $this; }