Spaces:
Sleeping
Sleeping
Commit
·
a96c1e5
1
Parent(s):
8f6b711
ucwords default controller - test 6
Browse files- mvc/app/libs/Core.php +3 -3
mvc/app/libs/Core.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
*/
|
11 |
|
12 |
class Core{
|
13 |
-
protected $defaultController = 'welcome';
|
14 |
protected $defaultMethod = 'index';
|
15 |
protected $defaultParams = [];
|
16 |
|
@@ -22,8 +22,8 @@
|
|
22 |
$this->defaultController = ucwords($url[0]);
|
23 |
unset($url[0]);
|
24 |
}
|
25 |
-
require_once('../app/controllers/' .
|
26 |
-
$this->defaultController = new
|
27 |
}
|
28 |
|
29 |
public function getURL(){
|
|
|
10 |
*/
|
11 |
|
12 |
class Core{
|
13 |
+
protected $defaultController = (ucwords('welcome'));
|
14 |
protected $defaultMethod = 'index';
|
15 |
protected $defaultParams = [];
|
16 |
|
|
|
22 |
$this->defaultController = ucwords($url[0]);
|
23 |
unset($url[0]);
|
24 |
}
|
25 |
+
require_once('../app/controllers/' . $this->defaultController . '.php');
|
26 |
+
$this->defaultController = new $this->defaultController;
|
27 |
}
|
28 |
|
29 |
public function getURL(){
|