Public Member Functions | |
__construct () | |
_set_routing () | |
_set_default_controller () | |
_set_request ($segments=array()) | |
_validate_request ($segments) | |
_parse_routes () | |
set_class ($class) | |
fetch_class () | |
set_method ($method) | |
fetch_method () | |
set_directory ($dir) | |
fetch_directory () | |
_set_overrides ($routing) | |
Data Fields | |
$config | |
$routes = array() | |
$error_routes = array() | |
$class = '' | |
$method = 'index' | |
$directory = '' | |
$default_controller | |
__construct | ( | ) |
Constructor
Runs the route mapping function.
_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
_set_default_controller | ( | ) |
Set the default controller
private
_set_overrides | ( | $routing) |
Set the controller overrides
public
array |
_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 |
_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
_validate_request | ( | $segments) |
Validates the supplied segments. Attempts to determine the path to the controller.
private
array |
fetch_class | ( | ) |
Fetch the current class
public
fetch_directory | ( | ) |
Fetch the sub-directory (if any) that contains the requested controller class
public
fetch_method | ( | ) |
Fetch the current method
public
set_class | ( | $class) |
Set the class name
public
string |
set_directory | ( | $dir) |
Set the directory name
public
string |
set_method | ( | $method) |
Set the method name
public
string |