>
>
> $route = new Zend_Controller_Router_Route(
> 'author/:username',
> array(
> 'controller' => 'profile',
> 'action' => 'userinfo'
> )
> );
>
> $router->addRoute('user', $route);
>
>
> my questions are:
> 1. what is 'user' ?
> 2. where should you put this code?
>
Hi,
The 'user' is just the name of your route. You should put this code to your
instantiation code before you do any routing, like for example to
routeStartup() hook of the fronController plugin. This will set up your
routing rules.
Good luck,
Dmitry.
--
View this message in context: http://www.nabble.com/basic-questions-about-Zend_Controller_Router_Route-tp24372257p24372328.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论