* Instantiate concrete5. * ---------------------------------------------------------------------------- */ /** @var Application $cms */ $cms = (require DIR_APPLICATION . '/bootstrap/start.php'); $cms->instance('app', $cms); // Bind fully application qualified class names $cms->instance('Concrete\\Core\\Application\\Application', $cms); $cms->instance('Illuminate\\Container\\Container', $cms); /** * ---------------------------------------------------------------------------- * Bind the IOC container to our facades * Completely indebted to Taylor Otwell & Laravel for this. * ---------------------------------------------------------------------------- */ Facade::setFacadeApplication($cms); /** * ---------------------------------------------------------------------------- * Load path detection for relative assets, URL and path to home. * ---------------------------------------------------------------------------- */ require DIR_BASE_CORE . '/bootstrap/paths.php'; /** * ---------------------------------------------------------------------------- * Add install environment detection * ---------------------------------------------------------------------------- */ $db_config = array(); if (file_exists(DIR_APPLICATION . '/config/database.php')) { $db_config = (include DIR_APPLICATION . '/config/database.php'); }
/** * Boot up * Return a response if we're ready to output. * * @return null|Response */ public function boot() { $app = $this->app; /* * ---------------------------------------------------------------------------- * Bind the IOC container to our facades * Completely indebted to Taylor Otwell & Laravel for this. * ---------------------------------------------------------------------------- */ Facade::setFacadeApplication($app); /** * ---------------------------------------------------------------------------- * Load path detection for relative assets, URL and path to home. * ----------------------------------------------------------------------------. */ require_once DIR_BASE_CORE . '/bootstrap/paths.php'; /* * ---------------------------------------------------------------------------- * Add install environment detection * ---------------------------------------------------------------------------- */ $this->initializeEnvironmentDetection($app); /* * ---------------------------------------------------------------------------- * Enable Configuration * ---------------------------------------------------------------------------- */ $config = $this->initializeConfig($app); /* * ---------------------------------------------------------------------------- * Enable Localization * ---------------------------------------------------------------------------- */ $this->initializeLocalization($app); /* * ---------------------------------------------------------------------------- * Finalize paths. * ---------------------------------------------------------------------------- */ require DIR_BASE_CORE . '/bootstrap/paths_configured.php'; /* * ---------------------------------------------------------------------------- * Timezone Config * ---------------------------------------------------------------------------- */ $this->initializeTimezone($config); /* * ---------------------------------------------------------------------------- * Setup core classes aliases. * ---------------------------------------------------------------------------- */ $this->initializeClassAliases($config); /* * ---------------------------------------------------------------------------- * Setup the core service groups. * ---------------------------------------------------------------------------- */ $this->initializeServiceProviders($app, $config); /* * ---------------------------------------------------------------------------- * Simple legacy constants like APP_CHARSET * ---------------------------------------------------------------------------- */ $this->initializeLegacyDefinitions($config, $app); /* * ---------------------------------------------------------------------------- * Setup file cache directories. Has to come after we define services * because we use the file service. * ---------------------------------------------------------------------------- */ $app->setupFilesystem(); /* * ---------------------------------------------------------------------------- * Registries for theme paths, assets, routes and file types. * ---------------------------------------------------------------------------- */ $this->initializeAssets($config); $this->initializeRoutes($config); $this->initializeFileTypes($config); // If we're not in the CLI SAPI, lets do additional booting for HTTP if (!$this->app->isRunThroughCommandLineInterface()) { return $this->bootHttpSapi($config, $app); } }