CI_VERSION
CI_VERSION = '4.0.0-rc.3'
The current version of CodeIgniter Framework
继承主类,用于init.php
Of course, there are variations to that flow, but this is the brains.
$config : \Config\App
Main application configuration
$benchmark : \CodeIgniter\Debug\Timer
Timer instance.
$request : \CodeIgniter\HTTP\Request|\CodeIgniter\HTTP\IncomingRequest|\CodeIgniter\HTTP\CLIRequest
Current request.
$response : \CodeIgniter\HTTP\ResponseInterface
Current response.
run(\CodeIgniter\Router\RouteCollectionInterface $routes = null, boolean $returnResponse = false) : boolean|\CodeIgniter\HTTP\RequestInterface|\CodeIgniter\HTTP\Response|\CodeIgniter\HTTP\ResponseInterface|mixed
Launch the application!
This is "the loop" if you will. The main entry point into the script that gets the required class instances, fires off the filters, tries to route the response, loads the controller and generally makes all of the pieces work together.
\CodeIgniter\Router\RouteCollectionInterface | $routes | |
boolean | $returnResponse |
setRequest(\CodeIgniter\HTTP\Request $request) : \CodeIgniter\CodeIgniter
Sets a Request object to be used for this request.
Used when running certain tests.
\CodeIgniter\HTTP\Request | $request |
displayCache(\Config\Cache $config) : boolean|\CodeIgniter\HTTP\ResponseInterface
Determines if a response has been cached for the given URI.
\Config\Cache | $config |
cachePage(\Config\Cache $config) : mixed
Caches the full response from the current request. Used for full-page caching for very high performance.
\Config\Cache | $config |
storePreviousURL(\CodeIgniter\HTTP\URI $uri)
If we have a session object to use, store the current URI as the previous URI. This is called just prior to sending the response to the client, and will make it available next request.
This helps provider safer, more reliable previous_url() detection.
\CodeIgniter\HTTP\URI | $uri |
handleRequest(\CodeIgniter\Router\RouteCollectionInterface $routes = null, $cacheConfig, boolean $returnResponse = false) : \CodeIgniter\HTTP\RequestInterface|\CodeIgniter\HTTP\Response|\CodeIgniter\HTTP\ResponseInterface|mixed
Handles the main request logic and fires the controller.
\CodeIgniter\Router\RouteCollectionInterface | $routes | |
$cacheConfig | ||
boolean | $returnResponse |
forceSecureAccess(integer $duration = 31536000)
Force Secure Site Access? If the config value 'forceGlobalSecureRequests' is true, will enforce that all requests to this site are made through HTTPS. Will redirect the user to the current page with HTTPS, as well as set the HTTP Strict Transport Security header for those browsers that support it.
integer | $duration | How long the Strict Transport Security should be enforced for this URL. |
tryToRouteIt(\CodeIgniter\Router\RouteCollectionInterface $routes = null) : string
Try to Route It - As it sounds like, works with the router to match a route against the current URI. If the route is a "redirect route", will also handle the redirect.
\CodeIgniter\Router\RouteCollectionInterface | $routes | An collection interface to use in place of the config file. |
display404errors(\CodeIgniter\Exceptions\PageNotFoundException $e)
Displays a 404 Page Not Found error. If set, will try to call the 404Override controller/method that was set in routing config.
\CodeIgniter\Exceptions\PageNotFoundException | $e |