public function offsetUnset($offset) { unset($this->settings[$offset]); foreach ($this->files as $file => $settings) { $key = array_search($offset, $settings); if ($key !== false) { unset($this->files[$file][$key]); } } }