path('sys'))); /** * Set the CLI options on the $_SERVER global array so we can easily * retrieve them from the various parts of the CLI code. We can use * the Request class to access them conveniently. */ if (defined('STDIN')) { $console = CLI\Command::options($_SERVER['argv']); list($arguments, $options) = $console; $options = array_change_key_case($options, CASE_UPPER); $_SERVER['CLI'] = $options; } /** * The Laravel environment may be specified on the CLI using the env * option, allowing the developer to easily use local configuration * files from the CLI since the environment is usually controlled * by server environmenet variables. */ if (isset($_SERVER['CLI']['ENV'])) { $_SERVER['LARAVEL_ENV'] = $_SERVER['CLI']['ENV']; } /** * Finally we'll grab all of the bundles and register them with the * bundle class. All of the bundles are stored in an array within * the application directory which defines all bundles. */ $bundles = require path('app').'bundles'.EXT; foreach ($bundles as $bundle => $config) { Bundle::register($bundle, $config); }