template = new View($this->template); if ($this->auto_render == TRUE) { // Render the template immediately after the controller method Event::add('system.post_controller', array($this, '_render')); } } /** * Render the loaded template. */ public function _render() { if ($this->auto_render == TRUE) { // Render the template when the class is destroyed $this->template->render(TRUE); } } } // End Template_Controller