2010年12月30日星期四

Re: [fw-mvc] Re: 'Route not defined' exception

"rent" is your hostname route.

"rent-default" is the name of the chained route.


On Dec 30, 2010, at 8:04 AM, Derk wrote:

> I tried it, but it doesn't help
>
> -----Oorspronkelijk bericht----- From: damir.mitrovic
> Sent: Wednesday, December 29, 2010 5:14 PM
> To: fw-mvc@lists.zend.com
> Subject: [fw-mvc] Re: 'Route not defined' exception
>
>
> Hi,
>
> perhaps you are missing:
>
> resources.router.routes.rent.chains.index.type = "Zend_Controller_Router_Route"
>
> Regards,
> Damir
>
>
>> Hello,
>>
>> The code I have is exactly like this:
>> application.ini
>>
>> resources.router.routes.rent.type = "Zend_Controller_Router_Route_Hostname"
>> resources.router.routes.rent.route = "rent.example.com"
>> resources.router.routes.rent.defaults.module = "rent"
>> resources.router.routes.rent.chains.default.route = ":controller/:action/*"
>> resources.router.routes.rent.chains.default.defaults.controller = "index"
>> resources.router.routes.rent.chains.default.defaults.action = "index"
>>
>> And in a controller to test
>> echo $this->view->url(array(
>> 'controller' => 'user',
>> 'action' => 'activate',
>> 'email' => '[hidden email]',
>> 'key' => 'somekey'
>> ), 'rent');
>> exit;
>>
>> But it raises an exception with message 'Route rent is not defined'
>>
>> All other routes in my application.ini are working fine.
>>
>> What could be the problem?
>>
>> Regards,
>> Derk
>
> --
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/Route-not-defined-exception-tp3167278p3167304.html
> Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: