viewfile = $viewfile; } } } // set undeclared view property public function __set($property, $value) { if (!isset($this->$property)) { $this->properties[$property] = $value; } } // get undeclared view property public function __get($property) { if (isset($this->properties[$property])) { return $this->properties[$property]; } } // parse view properties and return output public function display() { extract($this->properties); ob_start(); include($this->viewfile); return ob_get_clean(); } }// End View class