setOptions($options); } public function __get($key) { if ('_' == $key[0]) { throw new Qs_ViewController_Exception(sprintf('Cannot retrieve value for protected/private property "%s"', $key)); } if (!isset($this->$key)) { return null; } return $this->$key; } public function __set($key, $value) { $this->setProperty($key, $value); } public function setProperty($name, $value) { $name = (string) $name; if ('_' == $name[0]) { // Ignore protected options return $this; } if (null === $value) { unset($this->$name); } else { $this->$name = $value; } return $this; } public function setOptions($options) { foreach ($options as $key => $value) { $method = 'set' . ucfirst($key); if (method_exists($this, $method) && $key != 'options') { $this->$method($value); } else { $this->setProperty($key, $value); } } return $this; } public function setTemplatePath($templatePath) { $this->_templatePath = $templatePath; } public function getTemplate($template) { return Qs_SiteMap::getTemplate($template, $this->_templatePath); } }