Releases: dannyvankooten/AltoRouter
Releases · dannyvankooten/AltoRouter
2.0.2
v2.0
- Improved performance over previous versions
- Bumped PHP version requirement to PHP 5.6 or higher (we recommend an officially supported version)
- All function arguments that take an array are now type-hinted.
Version 1.2.0
Added getRoutes
to retrieve a full route mapping (#97)
$router = new AltoRouter()
$router->addRoutes(array(
array('GET', '/login', 'show_login_action', 'show_login'),
array('POST', '/login', 'do_login_action', 'do_login'),
array('DELETE', '/logout', 'do_logout_action', 'do_logout'),
));
$routes = $router->getRoutes();
var_export($routes);
Will output:
array (
0 =>
array (
0 => 'GET',
1 => '/login',
2 => 'show_login_action',
3 => 'show_login',
),
1 =>
array (
0 => 'POST',
1 => '/login',
2 => 'do_login_action',
3 => 'do_login',
),
2 =>
array (
0 => 'DELETE',
1 => '/logout',
2 => 'do_logout_action',
3 => 'do_logout',
),
)
Furthermore does this release concerns documentation changes.
Version 1.1.0
Added addRoutes
method for bulk adding routes (#68):
$router = new AltoRouter();
$router->addRoutes(array(
array('GET', '/login', 'show_login_action', 'show_login'),
array('POST', '/login', 'do_login_action', 'do_login'),
array('DELETE', '/logout', 'do_logout_action', 'do_logout'),
));
AltoRouter now supports unicode regular expressions (#69).
View all changes since v1.0.1.
NB. Following Semver; this is now v1.1.0 instead of v1.0.2
Version 1.0.1
Added support for custom match types:
$router = new AltoRouter();
$router->addMatchTypes(array('cId' => '[a-zA-Z]{2}[0-9](?:_[0-9]++)?'));
$router->map('GET', '/users/[cId:id]', 'customers#show', 'customers_show');
Fixed some bugs:
Version 1.0.0
Merge pull request #32 from koenpunt/add-license added license for packagist