Public Member Functions | |
CI_Router () | |
_set_routing () | |
_set_request ($segments=array()) | |
_validate_request ($segments) | |
_parse_routes () | |
set_class ($class) | |
fetch_class () | |
set_method ($method) | |
fetch_method () | |
set_directory ($dir) | |
fetch_directory () | |
Public Attributes | |
$config | |
$routes = array() | |
$error_routes = array() | |
$class = '' | |
$method = 'index' | |
$directory = '' | |
$uri_protocol = 'auto' | |
$default_controller | |
$scaffolding_request = FALSE |
CI_Router::_parse_routes | ( | ) |
Parse Routes
This function matches any routes that may exist in the config/routes.php file against the URI to determine if the class/method need to be remapped.
private
CI_Router::_set_request | ( | $ | segments = array() |
) |
Set the Route
This function takes an array of URI segments as input, and sets the current class/method
private
array | ||
bool |
CI_Router::_set_routing | ( | ) |
Set the route mapping
This function determines what should be served based on the URI request, as well as any "routes" that have been set in the routing config file.
private
CI_Router::_validate_request | ( | $ | segments | ) |
Validates the supplied segments. Attempts to determine the path to the controller.
private
array |
CI_Router::CI_Router | ( | ) |
Constructor
Runs the route mapping function.
CI_Router::fetch_class | ( | ) |
Fetch the current class
public
CI_Router::fetch_directory | ( | ) |
Fetch the sub-directory (if any) that contains the requested controller class
public
CI_Router::fetch_method | ( | ) |
Fetch the current method
public
CI_Router::set_class | ( | $ | class | ) |
Set the class name
public
string |
CI_Router::set_directory | ( | $ | dir | ) |
Set the directory name
public
string |
CI_Router::set_method | ( | $ | method | ) |
Set the method name
public
string |
CI_Router::$class = '' |
CI_Router::$config |
CI_Router::$default_controller |
CI_Router::$directory = '' |
CI_Router::$error_routes = array() |
CI_Router::$method = 'index' |
CI_Router::$routes = array() |
CI_Router::$scaffolding_request = FALSE |
CI_Router::$uri_protocol = 'auto' |