-- monk.e.boy <[email protected]> wrote
(on Thursday, 28 July 2011, 03:43 AM -0700):
> We have a routes.ini file that looks like:
>
> routes.abc.route = "tell-me-more/blog/:post_slug"
> routes.abc.defaults.post_slug = ""
> routes.abc.defaults.module = "default"
> routes.abc.defaults.controller = "tellMeMore" ; <<--- LOOK
> routes.abc.defaults.action = "blog"
>
> This WORKS on WinXP and Mac but NOT on Linux (PHP 5.2) [[cat /proc/version
> ==
> Linux version 2.6.18-164.11.1.el5 ([email protected]) (gcc
> version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Jan 20 07:39:04 EST
> 2010]]
>
> routes.abc.route = "tell-me-more/blog/:post_slug"
> routes.abc.defaults.post_slug = ""
> routes.abc.defaults.module = "default"
> routes.abc.defaults.controller = "tell-me-more" ; <<--- LOOK
> routes.abc.defaults.action = "blog"
>
> This works on all systems. Curious?!
This is actually documented. Controller and action _names_ for purposes
of the request and view scripts should not be camelCased or MixedCase --
they should use word separators ('-' or '.'). When done that way, we can
easily normalize the name, and then transform it to camelCase or
MixedCase when resolving class and method names.
So, 'tell-me-more' or 'tell.me.more' as a controller name will resolve
to class TellMeMoreController; as an action name, it would resolve to
tellMeMoreAction().
--
Matthew Weier O'Phinney
Project Lead | [email protected]
Zend Framework | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]