2008年8月7日星期四

Re: [fw-mvc] Again... routing problem

-- Václav Vaník <vanik@walk.cz> wrote
(on Thursday, 07 August 2008, 07:49 AM -0700):
> I have unfortunately problem with modules routing.
>
> I created 2 modules:
>
> default
> IndexController
> FooController
>
> real
> IndexController
> BooController
>
> to bootstrap I added:
>
> $frontController = Zend_Controller_Front::getInstance();
> $frontController->addModuleDirectory(ROOT_DIR . '/app/www/modules');
> //folder is set right
>
> and now examples:
>
> http://test/ - works well, default module, controller index, action index
> http://test/foo - works well, default modul, controller foo, action index
>
> http://test/real - doesnt work, module real, controller index, action index
> http://test/real/boo - doesnt work, module real, controller boo, action
> index
>
> How could I correct this? I red zf manual, searched Google, I think its set
> correctly.

Do the files real/controllers/IndexController.php and
real/controllers/BooController.php define the classes
Real_IndexController and Real_BooController, respectively?

Controllers in modules need to be prefixed with the module name (and the
module prefix is always passed to ucfirst()).

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: