Пример #1
0
 public function initRouter()
 {
     $options = App::conf('app', 'router', array());
     $router = Router::factory($options);
     $router->setConfig(App::conf('route'));
     return $router;
 }
Пример #2
0
 public function testNormalize()
 {
     $router = \Core\Router\Router::factory(array('type' => 'rewrite'));
     $this->assertTrue($router->normalizeRoute('One/Two/ThreeFour') == 'one/two/three-four');
 }
Пример #3
0
 public function initRouter()
 {
     $options = array('type' => 'Console', 'default_route' => 'help/index');
     $router = Router::factory($options);
     return $router;
 }