Этот коммит содержится в:
2019-11-10 14:07:29 +03:00
родитель 3e3cfb4cf0
Коммит a54744ffb9
3 изменённых файлов: 55 добавлений и 3 удалений

Просмотреть файл

@@ -23,7 +23,12 @@ class App
*/
public $db = null;
public function __construct()
/**
* App constructor.
*
* @param bool $start Start router. Default false.
*/
public function __construct(bool $start = true)
{
global $app;
$app = $this;
@@ -40,7 +45,9 @@ class App
->setControllersNamespace('\\MyApp\\Controller\\')
->setSiteName('BadPing. Nagios better');
new Router();
if ($start) {
new Router();
}
}
/**