PHP5.3+ Routing Class. Supports REST, dynamic and reversed routing.
View the Project on GitHub dannyvankooten/AltoRouter
Download ZIP View on GitHubTo match the current request, just call the `match()` method without any parameters.
If a match was found, the match()
method will return an associative array with the following 3 keys.
target
(mixed)
The target of the route, given during mapping the route.
params
(array)
Named parameters found in the request url.
name
(string)
The name of the route.
Example
AltoRouter does not process the request for you, you are free to use the method you prefer. Here is a simplified example how to process requests using closures though.