1
0
mirror of https://github.com/dannyvankooten/AltoRouter.git synced 2025-10-21 19:26:09 +02:00

fix for older PHP versions

This commit is contained in:
Danny van Kooten
2013-03-19 11:29:19 +07:00
parent bf2e1643d8
commit b9c79f1d0d
2 changed files with 5 additions and 3 deletions

View File

@@ -3,11 +3,13 @@
require 'AltoRouter.php';
$router = new AltoRouter();
$router->setBasePath('/AltoRouter');
$router->setBasePath('/php-projects/AltoRouter');
$router->map('GET|POST','/', 'home#index', 'home');
$router->map('GET','/users/', array('c' => 'UserController', 'a' => 'ListAction'));
$router->map('GET','/users/[i:id]', 'users#show', 'users_show');
$router->map('POST','/users/[i:id]/[delete|update:action]', 'usersController#doAction', 'users_do');
$router->map('GET','/error/', 'whatever');
$router->map('GET','/error/[i:code]/', 'whatever');
// match current request
$match = $router->match();