Formatting

This commit is contained in:
Starbeamrainbowlabs 2019-01-15 19:26:14 +00:00
parent dc4d821f27
commit ca955f3c89
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 4 additions and 6 deletions

10
api.php
View File

@ -3,8 +3,8 @@ $start_time = microtime(true);
define("ROOT_DIR", dirname(__FILE__) . "/");
// 1: Autoloaders
// 1: Autoloaders
require("vendor/autoload.php");
$autoloader = new \Aura\Autoload\Loader();
@ -12,6 +12,7 @@ $autoloader->addPrefix("AirQuality", "logic");
$autoloader->addPrefix("SBRL", "lib/SBRL");
$autoloader->register();
// 2: Settings
$settings = new \SBRL\TomlConfig(
"data/settings.toml",
@ -19,7 +20,7 @@ $settings = new \SBRL\TomlConfig(
);
// 2: Dependency injection
// 3: Dependency injection
$di_builder = new DI\ContainerBuilder();
$di_builder->addDefinitions("di_config.php");
@ -37,15 +38,12 @@ if($settings->get("env.mode") == "production") {
$di_container = $di_builder->build();
// 3: Settings
$settings = $di_container->get(\SBRL\TomlConfig::class);
// 4: Database
// Done automagically by PHP-DI.
// PHP-DI autowires it, and doesn't create more than 1 instance of it either
// 5: Action
// Figure out the action name