Skip to content

Releases: dannyvankooten/AltoRouter

2.0.2

24 Sep 07:02
f6fede4
Compare
Choose a tag to compare
Merge pull request #247 from aliazizi/patch-1

Check for empty request URI, thank you @aliazizi

v2.0

10 Nov 19:37
Compare
Choose a tag to compare

Version 1.2.0

08 May 11:22
Compare
Choose a tag to compare

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.

View all changes since v1.1.0.

Version 1.1.0

17 Apr 09:21
Compare
Choose a tag to compare

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

23 Jan 14:07
Compare
Choose a tag to compare

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:

  • #38 #20 When a basePath is set, the custom route is not being checked against because the first character is not an @. (Fixed in 01258d1)
  • #22 A . was not seen as path separator for optional parts. (Fixed in #35)

View all changes since v1.0.0.

Version 1.0.0

07 Oct 15:14
Compare
Choose a tag to compare
Merge pull request #32 from koenpunt/add-license

added license for packagist