SAND-framework/application/class/Application.php

34 lines
775 B
PHP
Raw Normal View History

<?php
namespace MVC\Classe;
2019-03-05 16:49:15 +01:00
require APPLICATION_PATH . DIRECTORY_SEPARATOR . "parameters.php";
2019-03-05 13:26:50 +01:00
class Application
{
public $http;
public $url;
public $browser;
public $route;
public function __construct(){
$this->http = new HttpMethod();
$this->browser = new Browser();
$this->url = new Url($this->http->method, $this->browser->isAppRequest());
$dispacher = new Dispacher();
$this->route = $dispacher->route;
}
public function launch(){
//print_r($this->route);
$controlleur = new Controlleur($this);
//si la page n'est un controlleur d'action alors on affiche l'écran
if(!$this->url->page['control']) {
print($controlleur->vue->ecran);
}
}
}