/** * Actual logic for removing element by its key. * * @param mixed $offset * @param bool $arrayAccess * @return mixed|void */ private function doRemove($offset, $arrayAccess) { $this->initialize(); $removed = $arrayAccess ? $this->coll->offsetUnset($offset) : $this->coll->remove($offset); if (!$removed && !$arrayAccess) { return $removed; } $this->changed(); return $removed; }
/** * {@inheritDoc} */ public function offsetUnset($offset) { $this->initialize(); $this->collection->offsetUnset($offset); }
public function offsetUnset($offset) { $this->initialize(); $this->changed = true; return $this->col->offsetUnset($offset); }