| this application from the configuration files. The files are easily | separated by their concerns so they do not become really crowded. | */ $app['config'] = new \Hubzero\Config\Repository($client); /* |-------------------------------------------------------------------------- | Register The Core Service Providers |-------------------------------------------------------------------------- | | Register all of the core pieces of the framework including session, | caching, and more. | */ $providers = PATH_CORE . DS . 'bootstrap' . DS . $client . DS . 'services.php'; $services = file_exists($providers) ? require $providers : array(); foreach ($services as $service) { $app->register($service); } /* |-------------------------------------------------------------------------- | Load The Aliases |-------------------------------------------------------------------------- | | The alias loader is responsible for lazy loading the class aliases setup | for the application. | */ $aliases = PATH_CORE . DS . 'bootstrap' . DS . $client . DS . 'aliases.php'; $app->registerFacades(file_exists($aliases) ? require $aliases : array());
| Register all of the core pieces of the framework. | */ $providers = PATH_CORE . DS . 'bootstrap' . DS . 'Cli' . DS . 'services.php'; $services = file_exists($providers) ? require $providers : array(); foreach ($services as $service) { $app->register($service); } /* |-------------------------------------------------------------------------- | Load The Aliases |-------------------------------------------------------------------------- | | The alias loader is responsible for lazy loading the class aliases setup | for the application. | */ $facades = PATH_CORE . DS . 'bootstrap' . DS . 'Cli' . DS . 'aliases.php'; $aliases = file_exists($facades) ? require $facades : array(); $app->registerFacades($aliases); /* |-------------------------------------------------------------------------- | Return The Application |-------------------------------------------------------------------------- | | This script returns the application instance. The instance is given to | the calling script so we can separate the building of the instances | from the actual running of the application and sending responses. | */ return $app;
| this application from the configuration files. The files are easily | separated by their concerns so they do not become really crowded. | */ $app['config'] = new \Hubzero\Config\Repository('test', new \Hubzero\Config\FileLoader('config')); /* |-------------------------------------------------------------------------- | Register The Core Service Providers |-------------------------------------------------------------------------- | | Register all of the core pieces of the framework including session, | caching, and more. First, we'll load the core bootstrap list of services | and then we'll give the app a chance to modify that list. | */ $services = ['JoomlaServiceProvider', 'EventServiceProvider', 'TranslationServiceProvider', 'DatabaseServiceProvider', 'PluginServiceProvider', 'ProfilerServiceProvider', 'LogServiceProvider', 'RouterServiceProvider', 'FilesystemServiceProvider']; foreach ($services as $service) { require_once __DIR__ . '/providers/' . $service . '.php'; $app->register('Framework\\Providers\\' . $service); } /* |-------------------------------------------------------------------------- | Load The Aliases |-------------------------------------------------------------------------- | | The alias loader is responsible for lazy loading the class aliases setup | for the application. | */ $app->registerFacades(['App' => 'Hubzero\\Facades\\App', 'Config' => 'Hubzero\\Facades\\Config', 'Request' => 'Hubzero\\Facades\\Request', 'Response' => 'Hubzero\\Facades\\Response', 'Event' => 'Hubzero\\Facades\\Event', 'Route' => 'Hubzero\\Facades\\Route', 'User' => 'Hubzero\\Facades\\User', 'Lang' => 'Hubzero\\Facades\\Lang', 'Log' => 'Hubzero\\Facades\\Log', 'Date' => 'Hubzero\\Facades\\Date', 'Plugin' => 'Hubzero\\Facades\\Plugin', 'Filesystem' => 'Hubzero\\Facades\\Filesystem']);