| smoother. | */ @ini_set('magic_quotes_runtime', 0); @ini_set('zend.ze1_compatibility_mode', 0); /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | The first thing we will do is create a new application instance which | serves as the "glue" for all the parts of a hub, and is the IoC container | for the system binding all of the various parts. | */ $app = new Hubzero\Base\Application(); /* |-------------------------------------------------------------------------- | Set The Application Client |-------------------------------------------------------------------------- | | We're just setting this explicitly here - no need for dynamic detection. | The fact that we're in this file is detection enough. | */ $app['client'] = new Hubzero\Base\Client\Cli(); /* |-------------------------------------------------------------------------- | Bind The Application In The Container |-------------------------------------------------------------------------- |
| separate location so we can isolate the creation of an application | from the actual running of the application with a given request. | */ require_once PATH_ROOT . DS . 'core' . DS . 'bootstrap' . DS . 'autoload.php'; /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | The first thing we will do is create a new application instance which | serves as the "glue" for all the parts of a hub, and is the IoC container | for the system binding all of the various parts. | */ $app = new Hubzero\Base\Application(); /* |-------------------------------------------------------------------------- | Detect The Application Client |-------------------------------------------------------------------------- | | Here, we try to automatically detect the client type being called. This | will determine the set of services, facades, etc. that get loaded | further on in the application lifecycle. | */ $client = $app->detectClient(array('administrator' => 'administrator', 'api' => 'api', 'cli' => 'cli', 'install' => 'install'))->name; /* |-------------------------------------------------------------------------- | Bind The Application In The Container |--------------------------------------------------------------------------
| framework and we don't want any output leaking back to the user. | */ error_reporting(-1); ini_set('display_errors', 0); /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | The first thing we will do is create a new application instance which | serves as the "glue" for all the parts of a hub, and is the IoC container | for the system binding all of the various parts. | */ $app = new Hubzero\Base\Application(); /* |-------------------------------------------------------------------------- | Detect The Application Client |-------------------------------------------------------------------------- | | Here, we try to automatically detect the client type being called. This | will determine the set of services, facades, etc. that get loaded | further on in the application lifecycle. | */ $client = $app->detectClient(array('administrator' => 'administrator', 'api' => 'api', 'cli' => 'cli', 'install' => 'install', 'files' => 'files'))->name; /* |-------------------------------------------------------------------------- | Bind The Application In The Container |--------------------------------------------------------------------------
| Include some helper functions. There's really no other good spot to do | this so it happens here. | */ require __DIR__ . DS . 'src' . DS . 'Base' . DS . 'helpers.php'; /* |-------------------------------------------------------------------------- | Create The Application |-------------------------------------------------------------------------- | | The first thing we will do is create a new application instance which | serves as the "glue" for all the parts of a hub, and is the IoC container | for the system binding all of the various parts. | */ $app = new Hubzero\Base\Application(); // Explicitly set the client type to testing as some libs do require this info $app['client'] = Hubzero\Base\ClientManager::client('testing', true); /* |-------------------------------------------------------------------------- | Bind The Application In The Container |-------------------------------------------------------------------------- | | This may look strange, but we actually want to bind the app into itself | in case we need to Facade test an application. This will allow us to | resolve the "app" key out of this container for this app's facade. | */ $app['app'] = $app; /* |--------------------------------------------------------------------------