1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,27 +0,0 @@ |
1 |
-<?php |
|
2 |
- |
|
3 |
-define( "MODELS_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "modeles"); |
|
4 |
-define( "VIEW_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "vues"); |
|
5 |
-define( "CONTROLLER_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "controlleurs"); |
|
6 |
-define( "TRAITEMENT_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "traitements"); |
|
7 |
- |
|
8 |
-require CLASSES_PATH.DIRECTORY_SEPARATOR."modele.class.php"; |
|
9 |
-require CLASSES_PATH.DIRECTORY_SEPARATOR."vue.class.php"; |
|
10 |
- |
|
11 |
-class Controlleur{ |
|
12 |
- |
|
13 |
- public $modele; |
|
14 |
- public $vue; |
|
15 |
- |
|
16 |
- public function __construct($application){ |
|
17 |
- |
|
18 |
- if($application->url->page['control']){ |
|
19 |
- $url_params = $application->url->page['params']; |
|
20 |
- require TRAITEMENT_PATH . DIRECTORY_SEPARATOR . $application->url->page['name'] . '.php'; |
|
21 |
- } else { |
|
22 |
- $this->modele = new Modele($application->url->page); |
|
23 |
- $this->vue = new Vue($this); |
|
24 |
- } |
|
25 |
- } |
|
26 |
- |
|
27 |
-} |
... | ... |
@@ -3,6 +3,7 @@ |
3 | 3 |
define( "MODELS_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "modeles"); |
4 | 4 |
define( "VIEW_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "vues"); |
5 | 5 |
define( "CONTROLLER_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "controlleurs"); |
6 |
+define( "TRAITEMENT_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "traitements"); |
|
6 | 7 |
|
7 | 8 |
require CLASSES_PATH.DIRECTORY_SEPARATOR."modele.class.php"; |
8 | 9 |
require CLASSES_PATH.DIRECTORY_SEPARATOR."vue.class.php"; |
... | ... |
@@ -14,10 +15,13 @@ class Controlleur{ |
14 | 15 |
|
15 | 16 |
public function __construct($application){ |
16 | 17 |
|
17 |
- $this->modele = new Modele( $application->url->page ); |
|
18 |
- $this->vue = new Vue( $this ); |
|
19 |
- |
|
20 |
- |
|
18 |
+ if($application->url->page['control']){ |
|
19 |
+ $url_params = $application->url->page['params']; |
|
20 |
+ require TRAITEMENT_PATH . DIRECTORY_SEPARATOR . $application->url->page['name'] . '.php'; |
|
21 |
+ } else { |
|
22 |
+ $this->modele = new Modele($application->url->page); |
|
23 |
+ $this->vue = new Vue($this); |
|
24 |
+ } |
|
21 | 25 |
} |
22 | 26 |
|
23 | 27 |
} |
... | ... |
@@ -2,6 +2,7 @@ |
2 | 2 |
|
3 | 3 |
define( "MODELS_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "modeles"); |
4 | 4 |
define( "VIEW_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "vues"); |
5 |
+define( "CONTROLLER_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "controlleurs"); |
|
5 | 6 |
|
6 | 7 |
require CLASSES_PATH.DIRECTORY_SEPARATOR."modele.class.php"; |
7 | 8 |
require CLASSES_PATH.DIRECTORY_SEPARATOR."vue.class.php"; |
... | ... |
@@ -12,8 +13,8 @@ class Controlleur{ |
12 | 13 |
public $vue; |
13 | 14 |
|
14 | 15 |
public function __construct($application){ |
15 |
- $this->modele = new Modele( $application->url->page ); |
|
16 | 16 |
|
17 |
+ $this->modele = new Modele( $application->url->page ); |
|
17 | 18 |
$this->vue = new Vue( $this ); |
18 | 19 |
|
19 | 20 |
|
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,22 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+define( "MODELS_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "modeles"); |
|
4 |
+define( "VIEW_PATH" , APPLICATION_PATH . DIRECTORY_SEPARATOR . "include" . DIRECTORY_SEPARATOR . "vues"); |
|
5 |
+ |
|
6 |
+require CLASSES_PATH.DIRECTORY_SEPARATOR."modele.class.php"; |
|
7 |
+require CLASSES_PATH.DIRECTORY_SEPARATOR."vue.class.php"; |
|
8 |
+ |
|
9 |
+class Controlleur{ |
|
10 |
+ |
|
11 |
+ public $modele; |
|
12 |
+ public $vue; |
|
13 |
+ |
|
14 |
+ public function __construct($application){ |
|
15 |
+ |
|
16 |
+ $this->modele = new Modele( $application->url->page ); |
|
17 |
+ $this->vue = new Vue( $this ); |
|
18 |
+ |
|
19 |
+ |
|
20 |
+ } |
|
21 |
+ |
|
22 |
+} |