Advertisement
fruffl

example

Jan 19th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?PHP
  2.  
  3.     Dispatcher::registerMethodFacade('run', function($params, $chain)
  4.     {
  5.         Environment::set('request', $params['request']);
  6.  
  7.         foreach(array_reverse(Lib::get()) as $name => $config)
  8.         {
  9.             if($name === 'ILLI')
  10.                 continue;
  11.  
  12.             $file = "{$config['path']}/config/routes.php";
  13.             file_exists($file) ? call_user_func(function() use ($file) { include $file; }) : null;
  14.         }
  15.  
  16.         return $chain->next($params, $chain);
  17.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement