_id = $id; $this->_title = $title; $this->_helpURL = $helpURL; $this->_helpLink = $helpLink; } public function __get($name) { switch ($name) { case 'id': return $this->_id; case 'title': return $this->_title; case 'helpURL': return $this->_helpURL; case 'helpLink': return $this->_helpLink; } throw new \OutOfBoundsException('Invalid key: ' . $name); } }