diff options
| author | 2013-07-04 19:38:29 +0200 | |
|---|---|---|
| committer | 2013-07-04 19:38:29 +0200 | |
| commit | eb5f05304c253df90873b94ba52d7093115f3850 (patch) | |
| tree | 1152ab618aa5cf884a1f2f2e2d1926da4167a6be /lib/minz/ActionController.php | |
| parent | 8dd5fd51f74a47e5c80052f27a74cdcd5dd044b9 (diff) | |
| parent | b5f233f6d524ca9f74e9d33bf5692a1a678d7fec (diff) | |
Merge branch 'dev'0.4.0
Diffstat (limited to 'lib/minz/ActionController.php')
| -rwxr-xr-x | lib/minz/ActionController.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/minz/ActionController.php b/lib/minz/ActionController.php new file mode 100755 index 000000000..ab9389dbd --- /dev/null +++ b/lib/minz/ActionController.php @@ -0,0 +1,42 @@ +<?php +/** + * MINZ - Copyright 2011 Marien Fressinaud + * Sous licence AGPL3 <http://www.gnu.org/licenses/> +*/ + +/** + * La classe ActionController représente le contrôleur de l'application + */ +class ActionController { + protected $router; + protected $view; + + /** + * Constructeur + * @param $controller nom du controller + * @param $action nom de l'action à lancer + */ + public function __construct ($router) { + $this->router = $router; + $this->view = new View (); + $this->view->attributeParams (); + } + + /** + * Getteur + */ + public function view () { + return $this->view; + } + + /** + * Méthodes à redéfinir (ou non) par héritage + * firstAction est la première méthode exécutée par le Dispatcher + * lastAction est la dernière + */ + public function init () { } + public function firstAction () { } + public function lastAction () { } +} + + |
