phalcon框架学习之router
router定义
在DI中注册router的方法:
$di->set('router', function(){
$router = new Phalcon\Mvc\Router();
$router->add('/:moudule/:controller/:action/:params', array(
'module' => 1,
'controller'=> 2,
'action' => 3,
'params' =>4
));
return $router;
});