The CI controller is the hub and brain of the CI MVC that handles the HTTP requests, such as those from the browser, and operates with other CI resources to respond. The CI controller scope is described in the following figure and operates with other CI resources to respond to the requests:
The general flow with the CI controller is shown in the preceding figure. The user's browser sends the HTTP request to the URL of the CI project. Initially, the requested URL is processed via the routes based on the routes configuration /conf/routes.php
. For more information, refer to Chapter 2, Configurations and Naming Conventions. The specific CI controller is instantiated and the specific method is called. The CI method may be assisted by any of the project resources, such as models, libraries, and helpers for operations (business logic, and database queries). The CI controller generally uses a view that defines a web page to be responded to via an HTTP response.