CATEGORY: Controller


Controller --- CController

  • An instance of CController or of a class that extends CController.
  • It is created by the application object when the user requests it.
  • An action is just a controller class method whose name starts with action.
  • actionIndex() is the defaultaction, when the user request doesn’t specify any action it will be executed
  • The defaultaction can be changed by setting the public instance variable, Ccontroller::defaultAction.
  • Controllers and actions are identified by IDs.
  • For e.g. the route “http://localhost/testApp/index.php?r=site/login” will call actionLogin of siteController
  • By default, the route are case-sensitive. By setting CUrlManager::caseSensitive to false in the application configuration, we can make the routes case-insensitive .
There are no more results.