2008年8月7日星期四

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

Matthew Weier O'Phinney-3 wrote:
>
> 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/
>
>

oh, mistake...

I renamed files, I have now:

ROOT_DIR . '/app/www/modules/default/IndexController.php';
ROOT_DIR . '/app/www/modules/default/FooController.php';

ROOT_DIR . '/app/www/modules/real/Real_IndexController.php';
ROOT_DIR . '/app/www/modules/real/Real_BooController.php';

In the "real module files" I have classes:

and which classes names are correct?

a) IndexController and BooController
b) RealIndexController and RealBooController
c) Real_IndexController and Real_BooController

I tried all versions and I get:

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with
message 'Invalid controller specified (index)' in
/var/www/snrk/library/Zend/Controller/Dispatcher/Standard.php:249 Stack
trace: #0 /var/www/snrk/library/Zend/Controller/Front.php(919):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http)) #1
/var/www/snrk/app/www/bootstrap.php(67): Zend_Controller_Front->dispatch()
#2 /var/www/snrk/www/index.php(3): require_once('/var/www/snrk/a...') #3
{main} thrown in
/var/www/snrk/library/Zend/Controller/Dispatcher/Standard.php on line 249

Is it necessary to add route because of each module?
--
View this message in context: http://www.nabble.com/Again...-routing-problem-tp18872222p18873621.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: