rtgroup / http-router
There is no license information available for the latest version (dev-master) of this package.
Composant de gestion & routage de requete http
dev-master
2023-10-13 09:28 UTC
Requires
- php: >=8.0
- ext-curl: *
- curl/curl: ^2.5
This package is auto-updated.
Last update: 2024-11-13 12:01:41 UTC
README
Installation: composer require rtgroup/http-routerUsage:
use Rtgroup\HttpRouter\HttpRouter;use Rtgroup\HttpRouter\UrlNotFound;
require_once "vendor/autoload.php";
try
{
$router=new HttpRouter();
require_once "ExampleController.php";
$router->listening(array(
"content/view",
"/http-router/index.php"
),new ExampleController())
$router->close(); //fermer le routeur pour capturer toutes les erreurs http
{
echo $e->getMessage();
}
?>