2008年7月30日星期三

Re: [fw-core] ZF 1.5 Controller problems in Linux

-- Carlos Vieira <carlos.vieira@gmail.com> wrote
(on Thursday, 31 July 2008, 01:28 AM +0100):
> I have an application based on ZF running on Windows platform with no problems
> at all.
> When i moved this application to Linux, i have a problem with the camel case
> named controllers... like this, for example:
>
> <...>
> class WsCustomerController extends Zend_Controller_Action {
> <...>
>
> If i use this controller in the windows installation, it works fine... in Linux
> installation this does not work... it's related to camel case name problems....
> don't know why this happens... the error is: "Invalid controller specified
> (wscustomer)"
>
> Anyone can help please!!! It's very urgent!!!

Please read the migration part of the manual:

http://framework.zend.com/manual/en/zend.controller.migration.html#zend.controller.migration.fromoneohtoonefive

While the manual section talks about camelCased actions, most of those
rules also apply to controllers themselves.

Basically, you need to build your URLs appropriately.
'WsCustomerController' would map to 'ws-customer' at the URL level. If
you omit the dash, it resolves to 'WscustomerController'.

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

没有评论: