Example #1
0
function gymadarasz_router()
{
    $base = '/';
    $routes = [Router::regex('GET,POST', 'test$') => 'action_test', Router::regex('GET,POST', 'test/(:num)$') => 'action_handler_numeric', Router::regex('GET,POST', 'test/(:any)$') => 'action_handler'];
    try {
        Router::dispatch($routes, $base);
    } catch (RouterException $e) {
        MyDefaultControllerClass::indexMethod(null, null);
    }
}