public function __get($key) { return isset($this->attributes[$key]) ? $this->attributes[$key] : null; }