Example #1
0
 /**
  * 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);
     }
 }
Example #2
0
 /**
  * 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);
 }
Example #3
0
 public function offsetUnset($offset)
 {
     $this->load();
     parent::offsetUnset($offset);
 }
Example #4
0
 public function offsetUnset($index)
 {
     $this->collection->offsetUnset($index);
     parent::offsetUnset($index);
     $this->refreshPositions();
 }