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

This package is auto-updated.

Last update: 2024-11-13 12:01:41 UTC


README

Installation: composer require rtgroup/http-router

Usage:

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

}catch (UrlNotFound $e)
{
echo $e->getMessage();
}
?>