Vous êtes connecté en tant que anonymous Se Deconnecter
application/class/Application.php
137b5e76
 <?php
 
daf6e125
 namespace MVC\Classe;
137b5e76
 
8d6a2feb
 require APPLICATION_PATH . DIRECTORY_SEPARATOR . "parameters.php";
ff461209
 
137b5e76
 class Application
 {
fa275ca6
     public $http;
96549497
     public $url;
fa275ca6
     public $browser;
75da5399
     public $route;
fa275ca6
 
96549497
 
     public function __construct(){
fa275ca6
         $this->http = new HttpMethod();
         $this->browser = new Browser();
         $this->url = new Url($this->http->method, $this->browser->isAppRequest());
75da5399
 
         $dispacher = new Dispacher();
         $this->route = $dispacher->route;
96549497
     }
 
     public function launch(){
75da5399
         //print_r($this->route);
96549497
         $controlleur = new Controlleur($this);
         //si la page n'est un controlleur d'action alors on affiche l'écran
         if(!$this->url->page['control']) {
3957c7ee
             print($controlleur->vue->ecran);
         }
96549497
     }
 
137b5e76
 }