2017 © Pedro Peláez
 

library divergence

Divergence is a PHP router for creating simple web APIs that can grow with your application by providing more features only when you need them.

image

four43/divergence

Divergence is a PHP router for creating simple web APIs that can grow with your application by providing more features only when you need them.

  • Monday, March 24, 2014
  • by four43
  • Repository
  • 2 Watchers
  • 1 Stars
  • 0 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Divergence Router

A fast router for PHP, as easy, or as full featured as you need it., (*1)

Insipred by ToroRouter (https://github.com/anandkunal/ToroPHP), which is a great router to quickly create simple apps. Divergence aims to be almost as simple, but provide more features for larger apps., (*2)

Build Status

Master: Build Status, (*3)

Development: Build Status, (*4)

Features

  • Simple - Single file rouder, commented and easy to understand.
  • Debug - Provided debug handler, add it to your app temporarily to see what callbacks get called when, and with what data.
  • Server Setup - Use provided server configs (.htaccess for Apache and web.config for IIS) to route all of your requests to your index.php file.

Example

Basic

<?php
$routes = array(
    '/v1/action/:number' => 'RestV1\Controller\Action'
);
\Divegent\Router::serve($routes);

Will route /v1/action/123 to the controller RestV1\Controller\Action based on the method, GET will call the get() method as get(123), (*5)

Basic - Callback

The Versions

24/03 2014

dev-master

9999999-dev https://github.com/four43/divergence

Divergence is a PHP router for creating simple web APIs that can grow with your application by providing more features only when you need them.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

php events dependency injection router

24/03 2014

dev-development

dev-development https://github.com/four43/divergence

Divergence is a PHP router for creating simple web APIs that can grow with your application by providing more features only when you need them.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

php events dependency injection router