console.php 1007 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Lithium: the most rad php framework
  4. *
  5. * @copyright Copyright 2013, Union of RAD (http://union-of-rad.org)
  6. * @license http://opensource.org/licenses/bsd-license.php The BSD License
  7. */
  8. use lithium\console\Dispatcher;
  9. use lithium\core\Environment;
  10. /**
  11. * This filter sets the environment based on the current request. By default, `$request->env`, for
  12. * example in the command `li3 help --env=production`, is used to determine the environment.
  13. *
  14. */
  15. Dispatcher::applyFilter('run', function($self, $params, $chain) {
  16. Environment::set($params['request']);
  17. return $chain->next($self, $params, $chain);
  18. });
  19. /**
  20. * This filter will convert {:heading} to the specified color codes. This is useful for colorizing
  21. * output and creating different sections.
  22. *
  23. */
  24. // Dispatcher::applyFilter('_call', function($self, $params, $chain) {
  25. // $params['callable']->response->styles(array(
  26. // 'heading' => '\033[1;30;46m'
  27. // ));
  28. // return $chain->next($self, $params, $chain);
  29. // });
  30. ?>