hhvm-ext-web-util is a powerful collection of web utilities.
- R3 a high performance URL router library.
- autoconf
- automake
- check
- pkg-config
<?php
use WebUtil\R3;
$r = new R3();
$r->addRoute(
'/{id:\\d+}.html', // match condition
R3::METHOD_GET|R3::METHOD_POST, // match method GET or POST
'match /{id}.html' // custom define data
);
$m = $r->match('/123.html', R3::METHOD_GET); // request url with GET method
print_r($m);
Array
(
[0] => match /{id}.html
[1] => Array
(
[0] => 123 // id parameters
)
)
This software is released under MIT License.