mirror of
https://github.com/openvk/chandler.git
synced 2025-03-29 12:38:12 +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
|
||||
* @internal
|
||||
*/
|
||||
function ignite(bool $headless = false): void
|
||||
function ignite(): void
|
||||
{
|
||||
$this->registerFunctions();
|
||||
$this->registerDebugger();
|
||||
$this->igniteExtensions();
|
||||
if (!$headless) {
|
||||
header("Referrer-Policy: strict-origin-when-cross-origin");
|
||||
$this->route(function_exists("get_current_url") ? get_current_url() : $_SERVER["REQUEST_URI"]);
|
||||
}
|
||||
header("Referrer-Policy: strict-origin-when-cross-origin");
|
||||
$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_CONF", yaml_parse_file(CHANDLER_ROOT . "/chandler.yml"));
|
||||
|
||||
$bootstrap = require("../chandler/Bootstrap.php");
|
||||
$bootstrap = new Bootstrap();
|
||||
|
||||
$bootstrap->ignite();
|
||||
|
|
Loading…
Reference in a new issue