- ⌂ router
- Methods
- Static Methods
router::__construct()
The router
constructor takes an optional associative array of options.
Prototype
router __construct(array $options = [])
Parameters
See
static method parameters.route
Simple Example
$router = new \io_comand_mvc\router();
$router->route_request();
Options Example
$router = new \io_comand_mvc\router([
'base_url'=>'/some/path/',
'request'=>$_COMAND['REQUEST_URI'],
'default'=>'default',
'exit'=>FALSE,
]);
$found_controller = $router->route_request();
if( !$found_controller ){
$router->show_404();
}