2017 © Pedro Peláez
 

library routing

A libraty to control route for HTTP request

image

helionogueir/routing

A libraty to control route for HTTP request

  • Friday, December 9, 2016
  • by helionogueir
  • Repository
  • 1 Watchers
  • 0 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Routing

A libraty to control route for HTTP request., (*1)

Installation

Composer (https://getcomposer.org/) and (https://packagist.org/), (*2)

composer require helionogueir/routing

Usage

helionogueir\routing\route\Factory

Load route.json file and construct a "helionogueir\routing\Route" object, (*3)

use helionogueir\routing\route\Factory;
$namespace = "path/to/request";
$directory = "./routing/tests";
$route = Factory::byFile($namespace, $directory);

helionogueir\routing\server\Autoload

Define a new role for spl_autoload_register, (*4)

use helionogueir\routing\server\Autoload;
(new Autoload())->registerRoot("./routing/core");

helionogueir\routing\Route

Construct a new "helionogueir\routing\Route" object, (*5)

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");

TDD (Test Driven Development)

PHPUnit (https://phpunit.de/), (*6)

phpunit -c ./routing/tests/unit.xml

The Versions

09/12 2016

dev-master

9999999-dev https://github.com/helionogueir

A libraty to control route for HTTP request

  Sources   Download

MIT

The Requires

 

by Helio Nogueira

library route request routing response action autoload tool

09/12 2016

v1.0.0

1.0.0.0 https://github.com/helionogueir

A libraty to control route for HTTP request

  Sources   Download

MIT

The Requires

 

by Helio Nogueira

library route request routing response action autoload tool