From ca955f3c89a2ac5f32dc595c686f9d9f73159108 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 15 Jan 2019 19:26:14 +0000 Subject: [PATCH] Formatting --- api.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/api.php b/api.php index ecc5d95..68bfd31 100644 --- a/api.php +++ b/api.php @@ -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