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.
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
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:
, (*3)
Development:
, (*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
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
The Development Requires
php
events
dependency
injection
router
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
The Development Requires
php
events
dependency
injection
router