A libraty to control route for HTTP request.
Composer (https://getcomposer.org/) and (https://packagist.org/)
composer require helionogueir/routing
Load route.json file and construct a "helionogueir\routing\Route" object
use helionogueir\routing\route\Factory;
$namespace = "path/to/request";
$directory = "./routing/tests";
$route = Factory::byFile($namespace, $directory);
Define a new role for spl_autoload_register
use helionogueir\routing\server\Autoload;
(new Autoload())->registerRoot("./routing/core");
Construct a new "helionogueir\routing\Route" object
use helionogueir\routing\Route;
$request = "route";
$className = "helionogueir\\routing\\server\\Autoload";
$method = "registerRoot";
$route = new Route($request, $className, $method);
$className = $route->getClassName();
(new $className())->{$route->getMethod()}("./routing/core");
PHPUnit (https://phpunit.de/)
phpunit -c ./routing/tests/unit.xml