ZF-2995: camelCase example is MixedCase instead of camelCase

Issue Type: Docs: Problem Created: 2008-03-29T14:32:27.000+0000 Last Updated: 2008-06-15T20:32:35.000+0000 Status: Resolved Fix version(s): - 1.5.2 (15/May/08)

Reporter: Dennis Fogg (php_beach) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: Attachments:


In the note titled CamelCasedNamingConventions at… the discussion is talking about camelCased controller and action names, but the controller name is MixedCased instead of camelCased.

So, change: FooBarController::bazBatAction() to fooBarController::bazBatAction()

Although it's a minor change, it is the topic of the note...


Posted by James Dempster (letssurf) on 2008-03-30T15:38:11.000+0000

I don't see this problem on the page supplied. Maybe it's been fixed already?

Posted by Dennis Fogg (php_beach) on 2008-03-31T00:51:33.000+0000

nope, the problem is still there. the line is:

FooBarController::bazBatAction(), you'd refer to it on the url as /foo-

and it should be:

fooBarController::bazBatAction(), you'd refer to it on the url as /foo-

note the lower case for the first character of the sentence (camelCase for controller name).

Posted by James Dempster (letssurf) on 2008-03-31T03:37:49.000+0000

Ah I see what you mean.

Although from my testing I've found that you need the filename to be FooBarController.php and the class name can be either.

Posted by Wil Sinclair (wil) on 2008-03-31T15:00:02.000+0000

Please evaluate and categorize as necessary.

Posted by Dennis Fogg (php_beach) on 2008-03-31T15:38:55.000+0000


I appreciate your thoroughness in testing the documentation change! It's an interesting point that you raise.

In addition, there are coding standards to consider. The naming convention for classes is at:… but it does not mention camelCase vs MixedCase. This coding standard is for zend framework code, but since zend framework code will likely use controllers and actions, this coding standard will likey apply to controller naming also.

Posted by Dennis Fogg (php_beach) on 2008-03-31T15:46:33.000+0000

After reading the coding standard for a 2nd time (… ), I noticed the paragraph:

If a class name is comprised of more than one word, the first letter of each new word must be capitalized. Successive capitalized letters are not allowed, e.g. a class "Zend_PDF" is not allowed while "Zend_Pdf" is acceptable.

and since all ZF code is under the Zend directory, then all subsequent words will be capitalized which implies MixedCase class names.

Also, filenames seem to follow the class names from… :

File names must follow the mapping to class names described above.

Posted by James Dempster (letssurf) on 2008-03-31T16:45:53.000+0000

Does this mean the issue can now be closed?


Posted by Dennis Fogg (php_beach) on 2008-03-31T17:14:47.000+0000

This issue is still unresolved and should remain open, in my opinion.

The issue is: should the controller class (and filename) be camelCase or MixedCase? And the answer to this should be in the docs (probably in that note titled CamelCasedNamingConventions ) In the note, the controller name should be made consistent in both the description and the example given.

Posted by Dennis Fogg (php_beach) on 2008-04-04T14:33:53.000+0000

Any progress on this issue? The issue is really about recommending the naming convention for controller classes and files and putting that recommendation in the docs (or correcting the docs so they reflect that naming convention).

This post is the current recommendation:… Is that still the recommendation? Are both camelCase and MixedCase ok and supported in the future? Better to figure this out and tell ZF users than to force each user to spend time figuring out for themselves.

Posted by Matthew Weier O'Phinney (matthew) on 2008-04-04T14:55:59.000+0000

Dennis -- this is not a major issue. Most developers figure it out from the examples, and don't know the difference between MixedCase and camelCase and assume they are the same thing. At best, this is a minor documentation issue.

Additionally, we publish documentation only with new releases, so even if I get it into svn this minute, it will not be on the site for several weeks. Please have patience.

Posted by Matthew Weier O'Phinney (matthew) on 2008-04-22T11:44:34.000+0000

Scheduling for next mini release.

Posted by Matthew Weier O'Phinney (matthew) on 2008-05-02T12:20:37.000+0000

Resolved in trunk

Posted by Wil Sinclair (wil) on 2008-06-15T20:32:35.000+0000

Changing to comply with new IT coventions for components.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.