Table of Contents : El manual

Controller Conventions

Controller classnames are plural, CamelCased, and end in ‘Controller.’ PeopleController, BigPeopleController, and ReallyBigPeopleController are all examples of conventional controller names.

The first function you write for a controller might be the index() function. When a request specifies a controller but not an action, the default CakePHP behavior is to render the index() function of that controller. For example, a request to http://www.example.com/apples/ maps to a call on the index() function of the ApplesController, where as http://www.example.com/apples/view maps to a call on the view() function of the ApplesController.

You can also change the visibility of controller functions in CakePHP by prepending controller function names with underscores. If a controller function has been prepended with an underscore, the function will not be web-viewable through the dispatcher, but is available for internal use.