Refactor the Function Registering Method

Closes #13.
This commit is contained in:
Ilya Bakhlin 2022-01-01 19:53:45 +01:00
parent aa310f4ae4
commit 3b31eb8d08
2 changed files with 7 additions and 13 deletions

View file

@ -24,18 +24,6 @@ class Bootstrap
Chandler\Extensions\ExtensionManager::getInstance(); Chandler\Extensions\ExtensionManager::getInstance();
} }
/**
* Loads procedural APIs.
*
* @return void
* @internal
*/
private function registerFunctions(): void
{
foreach (glob(CHANDLER_ROOT . "/chandler/procedural/*.php") as $procDef)
require $procDef;
}
/** /**
* Starts router and serves request. * Starts router and serves request.
* *
@ -61,7 +49,6 @@ class Bootstrap
*/ */
public function ignite(): void public function ignite(): void
{ {
$this->registerFunctions();
$this->igniteExtensions(); $this->igniteExtensions();
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"]);

View file

@ -3,6 +3,13 @@
"classmap": [ "classmap": [
"chandler/Patterns/TSimpleSingleton.php" "chandler/Patterns/TSimpleSingleton.php"
], ],
"files": [
"chandler/procedural/db_busy.php",
"chandler/procedural/escape_url.php",
"chandler/procedural/mimes.php",
"chandler/procedural/panic.php",
"chandler/procedural/yaml.php"
],
"psr-4": { "psr-4": {
"Chandler\\": "src" "Chandler\\": "src"
} }