src/Traits/ArrayAccessTrait.php
public function offsetUnset($offset)
    {
        if ($this->offsetExists($offset) && $this->internalFilterHooks($offset, null, 'remove')) {
            $oldData = $this->offsetGet($offset);

            unset($this->baseConcreteData[$offset]);
            if (($index = array_search($offset, $this->baseArrayMap, true)) !== false) {
                unset($this->baseArrayMap[$index]);
            }
            $this->baseArrayMap = array_values($this->baseArrayMap);

            $this->arrayAccessMapIndex = count($this->baseArrayMap);

            $this->internalChangingHooks($offset, null, $oldData, 'remove');
        }
    }
public function offsetUnset($offset)
    {
        if ($this->offsetExists($offset) && $this->internalFilterHooks($offset, null, 'remove')) {
            $oldData = $this->offsetGet($offset);

            unset($this->baseConcreteData[$offset]);
            if (($index = array_search($offset, $this->baseArrayMap, true)) !== false) {
                unset($this->baseArrayMap[$index]);
            }
            $this->baseArrayMap = array_values($this->baseArrayMap);

            $this->arrayAccessMapIndex = count($this->baseArrayMap);

            $this->internalChangingHooks($offset, null, $oldData, 'remove');
        }
    }
public function offsetUnset ( $ offset ) { if ( $ this -> offsetExists ( $ offset ) && $ this -> internalFilterHooks ( $ offset , null , 'remove' ) ) { $ oldData = $ this -> offsetGet ( $ offset ) ; unset ( $ this -> baseConcreteData [ $ offset ] ) ; if ( ( $ index = array_search ( $ offset , $ this -> baseArrayMap , true ) ) !== false ) { unset ( $ this -> baseArrayMap [ $ index ] ) ; } $ this -> baseArrayMap = array_values ( $ this -> baseArrayMap ) ; $ this -> arrayAccessMapIndex = count ( $ this -> baseArrayMap ) ; $ this -> internalChangingHooks ( $ offset , null , $ oldData , 'remove' ) ; } }
this is necessary for ArrayAccess Interface and delete element by offset and rearrange the map
@param mixed $offset
@return void
this is necessary for ArrayAccess Interface and delete element by offset and rearrange the map