2009年2月4日星期三

Re: [fw-mvc] MVC Module names containing only digits

Hi Jan,

this is not possible because of the naming scheme ZF uses for modules.
Module controllers are prepended with the name of their module - This
would result in classes named like 2009_IndexController for your case,
which is not a legal class name in PHP.

And honestly, if you really think about creating a module called
"2009" for your application, this looks like some pretty broken
application design, at least to my eye. You might of course have valid
reasons to do so, but I'd be interested in a use case where this
actually makes sense. If you need this only for some pretty URLs,
consider using routes to achieve the desired result.

Best regards,
Tobias

2009/2/4 Jan Wagner-Rosenkranz <wagner@netsols.de>:
> Hi there,
>
> I am trying to use module names in my application that only contain digits.
> This does not seem to be possible, at least it does not seem to work the
> same as with alpha characters. I remember Matthew has once stated something
> about that on this list, but I cant seem to find that message. Any help?
>
> Cheers Jan
>
> PS: To clarify a bit. I want to use /APPBASE/2009 get routed to module 2009.
>

没有评论: