public function offsetSet($key, $value) { if (array_key_exists($key, $this->attributes)) { $this->attributes[$key] = $value; } }