From 12fe58d997d2066dc362fd393a18b4e5da190513 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 27 May 2009 15:11:53 -0700 Subject: Rename 'kohana' to 'system' to conform to the Kohana filesystem layout. I'm comfortable with us not clearly drawing the distinction about the fact that it's Kohana. --- system/controllers/template.php | 54 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 system/controllers/template.php (limited to 'system/controllers') diff --git a/system/controllers/template.php b/system/controllers/template.php new file mode 100644 index 00000000..34d1a226 --- /dev/null +++ b/system/controllers/template.php @@ -0,0 +1,54 @@ +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 \ No newline at end of file -- cgit v1.2.3