public function pull($valueOrExpression)
{
if ($valueOrExpression instanceof Expr) {
$valueOrExpression = $valueOrExpression->getQuery();
}
$this->requiresCurrentField();
$this->newObj['$pull'][$this->currentField] = $valueOrExpression;
return $this;
}
/** * Remove all elements matching the given value or expression from the * current array field. * * @see Expr::pull() * @see http://docs.mongodb.org/manual/reference/operator/pull/ * @param mixed|Expr $valueOrExpression * @return self */ public function pull($valueOrExpression) { $this->expr->pull($valueOrExpression); return $this; }