Vous êtes connecté en tant que anonymous Se Deconnecter
application/class/Controlleur.php
aed8ee26
 <?php
 
daf6e125
 namespace MVC\Classe;
 
aed8ee26
 define( "MODELS_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "modeles");
 define( "VIEW_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "vues");
8d6a2feb
 define( "CONTROLLER_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "controlleurs");
3957c7ee
 define( "TRAITEMENT_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "traitements");
aed8ee26
 
 class Controlleur{
 	
 	public $modele;
 	public $vue;
 	
 	public function __construct($application){
ff461209
 
3957c7ee
 	    if($application->url->page['control']){
             $url_params = $application->url->page['params'];
 	        require TRAITEMENT_PATH . DIRECTORY_SEPARATOR . $application->url->page['name'] . '.php';
         } else {
daf6e125
             $this->modele = new modele($application->url->page);
             $this->vue = new vue($this);
3957c7ee
         }
aed8ee26
 	}
 	
 }