|
Revision 3700, 1.2 kB
(checked in by Shadowhand, 12 days ago)
|
|
Updates to trunk:
- Removed all SYSPATH file checks
- Deleted some modules: code_coverage (3.0), shoutbox (defunct), user_guide (defunct), kobot (3.0), object_db (3.0)
- Updated ORM and ORM_Iterator to match 3.0, enabling the new HABTM stuff, see r3636 and r3640
|
-
Property svn:eol-style set to
LF
-
Property copyright set to
Copyright (c) 2007 Kohana Team
-
Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | abstract class Template_Controller extends Controller { |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | public $template = 'template'; |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | public $auto_render = TRUE; |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | public function __construct() |
|---|
| 29 | { |
|---|
| 30 | parent::__construct(); |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | $this->template = new View($this->template); |
|---|
| 34 | |
|---|
| 35 | if ($this->auto_render == TRUE) |
|---|
| 36 | { |
|---|
| 37 | |
|---|
| 38 | Event::add('system.post_controller', array($this, '_render')); |
|---|
| 39 | } |
|---|
| 40 | } |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | public function _render() |
|---|
| 46 | { |
|---|
| 47 | if ($this->auto_render == TRUE) |
|---|
| 48 | { |
|---|
| 49 | |
|---|
| 50 | $this->template->render(TRUE); |
|---|
| 51 | } |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | } |
|---|