mirror of
https://github.com/openvk/chandler.git
synced 2025-03-31 21:43:59 +03:00
Improving the Bootstrap class call.
This commit is contained in:
parent
1eb259a295
commit
24e48868d8
2 changed files with 4 additions and 11 deletions
|
@ -70,21 +70,14 @@ class Bootstrap
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts framework.
|
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
function ignite(bool $headless = false): void
|
function ignite(): void
|
||||||
{
|
{
|
||||||
$this->registerFunctions();
|
$this->registerFunctions();
|
||||||
$this->registerDebugger();
|
$this->registerDebugger();
|
||||||
$this->igniteExtensions();
|
$this->igniteExtensions();
|
||||||
if (!$headless) {
|
header("Referrer-Policy: strict-origin-when-cross-origin");
|
||||||
header("Referrer-Policy: strict-origin-when-cross-origin");
|
$this->route(function_exists("get_current_url") ? get_current_url() : $_SERVER["REQUEST_URI"]);
|
||||||
$this->route(function_exists("get_current_url") ? get_current_url() : $_SERVER["REQUEST_URI"]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Bootstrap;
|
|
||||||
|
|
|
@ -7,6 +7,6 @@ require_once(dirname(__DIR__) . "/vendor/autoload.php");
|
||||||
define("CHANDLER_ROOT", dirname(__DIR__));
|
define("CHANDLER_ROOT", dirname(__DIR__));
|
||||||
define("CHANDLER_ROOT_CONF", yaml_parse_file(CHANDLER_ROOT . "/chandler.yml"));
|
define("CHANDLER_ROOT_CONF", yaml_parse_file(CHANDLER_ROOT . "/chandler.yml"));
|
||||||
|
|
||||||
$bootstrap = require("../chandler/Bootstrap.php");
|
$bootstrap = new Bootstrap();
|
||||||
|
|
||||||
$bootstrap->ignite();
|
$bootstrap->ignite();
|
||||||
|
|
Loading…
Reference in a new issue