... | ... |
@@ -2,6 +2,7 @@ |
2 | 2 |
|
3 | 3 |
namespace MVC\Classe; |
4 | 4 |
|
5 |
+define( "INCLUDE_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include"); |
|
5 | 6 |
define( "CONTROLLERS_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "controlleurs"); |
6 | 7 |
|
7 | 8 |
require APPLICATION_PATH . DIRECTORY_SEPARATOR . "parameters.php"; |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,25 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+namespace MVC\Classe; |
|
4 |
+ |
|
5 |
+define( "CONTROLLERS_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "controlleurs"); |
|
6 |
+ |
|
7 |
+require APPLICATION_PATH . DIRECTORY_SEPARATOR . "parameters.php"; |
|
8 |
+ |
|
9 |
+class Application |
|
10 |
+{ |
|
11 |
+ public $url; |
|
12 |
+ |
|
13 |
+ public function __construct(){ |
|
14 |
+ $this->url = new Url(); |
|
15 |
+ } |
|
16 |
+ |
|
17 |
+ public function launch(){ |
|
18 |
+ |
|
19 |
+ $controlleur = new Controlleur($this); |
|
20 |
+ if(!$this->url->page['control']) { |
|
21 |
+ print($controlleur->vue->ecran); |
|
22 |
+ } |
|
23 |
+ } |
|
24 |
+ |
|
25 |
+} |