2017 © Pedro Peláez
 

library router

Routing package for PHP 7

image

darktec/router

Routing package for PHP 7

  • Tuesday, January 9, 2018
  • by Darkmantle
  • Repository
  • 1 Watchers
  • 2 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

PHP7 Routing Package

Latest Version on Packagist ![Software License][ico-license] Total Downloads, (*1)

Install

To install router as a Composer package run:, (*2)

``` bash $ composer require darktec/router, (*3)


## Usage First initialize the router ``` php Router::init();

Then create your mappings using METHOD, ROUTE, ACTION where ACTION is a function ``` php Router::map('GET', '/', '\package\controller@function');, (*4)

// OR, (*5)

Router::map('GET', '/', function() { echo 1; });, (*6)


Finally match the request method and URI ``` php Router::match($method, $uri);

If a match is found then the function defined is invoked., (*7)

Change log

Please see CHANGELOG for more information what has changed recently., (*8)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*9)

Credits

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions

09/01 2018

dev-master

9999999-dev https://github.com/darktec/router

Routing package for PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

route routing php7 router

09/01 2018

1.0.5

1.0.5.0 https://github.com/darktec/router

Routing package for PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

route routing php7 router

09/01 2018

1.0.4

1.0.4.0 https://github.com/darktec/router

Routing package for PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

route routing php7 router

02/05 2017

1.0.3

1.0.3.0 https://github.com/darktec/router

Routing package for PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

route routing php7 router

09/12 2015

1.0.2

1.0.2.0 https://github.com/darktec/router

Routing package for PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

route routing php7 router

24/11 2015

1.0.1

1.0.1.0 https://github.com/darktec/router

Routing package for PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

route routing php7 router

24/11 2015

1.0.0

1.0.0.0 https://github.com/darktec/router

Routing package for PHP 7

  Sources   Download

MIT

The Requires

 

The Development Requires

route routing php7 router