Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 22nd, 2012  |  syntax: None  |  size: 0.57 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. use lithium\net\http\Router;
  3. use lithium\core\Environment;
  4.  
  5. Router::connect('/boards/{:board_id:[0-9a-f]{24}}/{:controller}/{:id:[0-9a-f]{24}}');
  6. Router::connect('/boards/{:board_id:[0-9a-f]{24}}/{:controller}/{:action}');
  7.  
  8. if (!Environment::is('production')) {
  9.         Router::connect('/test/{:args}', array('controller' => 'lithium\test\Controller'));
  10.         Router::connect('/test', array('controller' => 'lithium\test\Controller'));
  11. }
  12.  
  13. Router::connect('/{:controller}/{:id:[0-9a-f]{24}}');
  14. Router::connect('/{:controller}/{:action}');
  15. Router::connect('/{:controller}/{:action}/{:args}');
  16. ?>