Naming Conventions in CakePHP

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

Bottom line: Controllers are plural, their tables plural as well, the entity is singular.

Class names and URLs

It is recommended to use the "DashedRoute" (which will tbe default in 3.1 anyway).

With a basic example, we take a closer look at the naming scheme in URLs:

/example-plugin/example-pages/action-name/passed-param?limit=1

This URL includes already all basic elements: A controller "ExamplePages" in the "ExamplePlugin" with an action "actionName" as well as a passed param "passed-param" and query string "limit" with a value of "1".
If the controller had a model, its table class would be "ExamplePages" and the entity class "ExamplePage". The table would be "example_pages".

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

/admin/example-plugin/example-pages/action-name/passed-param

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 (dashed) due to the "DashedRoute" class.

Coming from 2.x

If you upgrade a 2.x app, you can stick to the "InflectedRoute" however for BC and to stay URL-consistent for SEO reasons.
/example_plugin/example_pages/action_name/passed_param?limit=1
Would then resolve into a controller "ExamplePages" in the "ExamplePlugin" with an action "action_name" (!) as well as a passed param "passed_param" and query string "limit" with a value of "1".

Hands on

Try it out the different inflections with the Inflector.

Send your feedback or bugreport!