Doctrine\MongoDB\Query\Builder::push PHP Method

push() public method

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 also: Expr::push()
See also: http://docs.mongodb.org/manual/reference/operator/push/
See also: http://docs.mongodb.org/manual/reference/operator/each/
See also: http://docs.mongodb.org/manual/reference/operator/slice/
See also: http://docs.mongodb.org/manual/reference/operator/sort/
public push ( mixed | Expr $valueOrExpression )
$valueOrExpression mixed | Expr
    public function push($valueOrExpression)
    {
        $this->expr->push($valueOrExpression);
        return $this;
    }