https://github.com/four43/divergence
A fast router for PHP, as easy, or as full featured as you need it.
https://github.com/four43/divergence
Last synced: 5 months ago
JSON representation
A fast router for PHP, as easy, or as full featured as you need it.
- Host: GitHub
- URL: https://github.com/four43/divergence
- Owner: four43
- License: mit
- Created: 2014-03-19T00:58:05.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-24T05:05:48.000Z (about 12 years ago)
- Last Synced: 2025-02-09T10:31:00.475Z (over 1 year ago)
- Size: 180 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Divergence Router
=================
A fast router for PHP, as easy, or as full featured as you need it.
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.
Build Status
------------
Master: [](https://travis-ci.org/four43/divergence)
Development: [](https://travis-ci.org/four43/divergence)
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
'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)`
###Basic - Callback