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']; } /** * Register all of the core class aliases. These aliases provide a * convenient way of working with the Laravel core classes without * having to worry about the namespacing. The developer is also * free to remove aliases when they extend core classes. */ Autoloader::$aliases = Config::get('application.aliases'); /** * Register the default timezone for the application. This will * be the default timezone used by all date functions through * throughout the entire application. */ $timezone = Config::get('application.timezone'); date_default_timezone_set($timezone); /** * 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. */ $bundles = require path('app').'bundles'.EXT; foreach ($bundles as $bundle => $config) { Bundle::register($bundle, $config); }