/** * Removes the element at the specified position in this list. * @param string key * @return void * @throws NotSupportedException, \InvalidArgumentException */ public function offsetUnset($key) { if (!is_scalar($key)) { throw new InvalidArgumentException("Key must be either a string or an integer, " . gettype($key) . " given."); } $this->beforeRemove(); if (parent::offsetExists($key)) { parent::offsetUnset($key); } }
/** * Removes the element at the specified position in this list. * @param int index * @return void * @throws NotSupportedException, ArgumentOutOfRangeException */ public function offsetUnset($index) { if (!$this->isLoaded() && $this->isLoadable()) { $this->load(); } return parent::offsetUnset($index); }
public function offsetUnset($offset) { $this->load(); parent::offsetUnset($offset); }
public function offsetUnset($index) { $this->collection->offsetUnset($index); parent::offsetUnset($index); $this->refreshPositions(); }