Naming Conventions in CakePHP

First, you should definitly read cakephp-conventions.html. This should clarify the basics.

Bottom line: Controllers are plural, their models singular.

Class names and URLs

Then, with a basic request, we take a closer look at the naming scheme in URLs:


This url includes already all basic elements: A controller "ExamplePages" with an action "action_name" as well as a passed param "passed_param" and query string "limit" with a value of "1".
If the controller has a model, its name would be "ExamplePage".

If you also use prefix routing (usually with the prefix "admin") as well as a plugin "Data", this could be the url to the the same controller in that plugin:


What you need to understand is, that the class names as well as the namespaces like plugins are CamelCase, but the url representation is always lowercase_underscored (snake_case). This is what many confuse and what will hopefully not be supported in 3.x anymore. The ambiguity is not good for SEO purposes for example.

Hands on

Try it out with the Inflector.