public function offsetSet($key, $value) { if (is_null($key)) { throw new InvalidArgumentException('You must specify a key/array index.'); } $this->set($key, $value); }