2008年12月1日星期一

Re: [fw-mvc] Controller class naming when using modules

Try renaming the file to just FooController.php

Paul

----- Original Message -----
From: Jim Mullen <jim@idimensionz.com>
To: fw-mvc@lists.zend.com <fw-mvc@lists.zend.com>
Sent: Mon Dec 01 15:17:34 2008
Subject: [fw-mvc] Controller class naming when using modules

Environment: ZF 1.7.0

I have a directory structure like:
/application
    /modules
        /default
        /foo
            /controllers
                Foo_FooController.php

My module and controller name are the same (foo) so I wind up with a URL
like mysite.com/foo/foo/list where list is the action.

However, I'm getting an exception saying "Invalid Controller Specified
(foo)".  My class name in Foo_FooController.php is FooController.  I
also tried Foo_FooController and got the same error.  What do I need to
name my controller class for ZF dispatcher to recognize it?

Thanks!

没有评论: