2017 © Pedro Peláez
 

library via

The Php router.

image

newclass/via

The Php router.

  • Thursday, December 1, 2016
  • by newclass-pl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 28 Installations
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

README

license PHP 5.4+, (*1)

What is Via?

Via is a PHP router. Support for http request, cli and a lot more. Create own rule is very simple by implements interfaces., (*2)

Via can be used to develop all kind of websites and scripts., (*3)

Installation

The best way to install is to use the composer by command:, (*4)

composer require newclass/via, (*5)

composer install, (*6)

Use example

use Via\Action\HTTPAction;
use Via\Action\HTTPRequest;
use Via\Router;

$router=new Router();

$router->addAction(new HTTPAction('/users','get'),new YourDispatcher('users')); //YourDispatcher create by implements Via\Dispatcher interface
$router->addAction(new HTTPAction('/users/{id}.json','post'),new YourDispatcher());

try{    
    $dispatcher=$router->createDispatcher(new HTTPRequest('/users/1232.json','post'));
    $dispatcher->execute();
} catch(RouteNotFoundException $e){
    header("HTTP/1.0 404 Not Found");
}

The Versions

01/12 2016

dev-master

9999999-dev

The Php router.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Michal Tomczak

01/12 2016

dev-develop

dev-develop

The Php router.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Michal Tomczak

01/12 2016

v1.0.0

1.0.0.0

The Php router.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Michal Tomczak