Задел на будущее - использование контроллеров с конструкторами
This commit is contained in:
parent
da205d6e93
commit
c377fccb65
|
|
@ -76,6 +76,12 @@ class App
|
||||||
if (method_exists($controller, $action))
|
if (method_exists($controller, $action))
|
||||||
{
|
{
|
||||||
$controller::$action();
|
$controller::$action();
|
||||||
|
// if (method_exists($controller, '__construct')) {
|
||||||
|
// $class = new $controller();
|
||||||
|
// $class->$action();
|
||||||
|
// } else {
|
||||||
|
// $controller::$action();
|
||||||
|
// }
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
self::error404();
|
self::error404();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue