env`, for * example in the command `li3 help --env=production`, is used to determine the environment. * * Routes are also loaded, to facilitate URL generation from within the console environment. * */ Filters::apply('lithium\console\Dispatcher', 'run', function($params, $next) { Environment::set($params['request']); foreach (array_reverse(Libraries::get()) as $name => $config) { if ($name === 'lithium') { continue; } $file = "{$config['path']}/config/routes.php"; file_exists($file) ? call_user_func(function () use ($file) { include $file; }) : null; } return $next($params); }); /** * This filter will convert {:heading} to the specified color codes. This is useful for colorizing * output and creating different sections. * */ // Filters::apply('lithium\console\Dispatcher', '_call', function($params, $next) { // $params['callable']->response->styles(array( // 'heading' => '\033[1;30;46m' // )); // return $next($params); // }); ?>