You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
850 B
43 lines
850 B
12 years ago
|
<?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 () { }
|
||
|
}
|
||
|
|
||
|
|