public function __set($name, $value) { if (array_key_exists($name, $this->templates)) { $this->templates[$name] = $value; return; } return parent::__set($name, $value); }