public function offsetGet($key) { if (array_key_exists($key, $this->attributes)) { return $this->attributes[$key]; } return null; }