Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bitkill/reckoner-php

A high-performance php micro-router
https://github.com/bitkill/reckoner-php

Last synced: about 10 hours ago
JSON representation

A high-performance php micro-router

Awesome Lists containing this project

README

        

reckoner-php
============

a light php rest micro router class,
now with groups!

this is an attempt of making a faster, identical php "slim" router
you can also set custom http methods thru some php magic!

example:

get('/hello/:name', function($name) {
echo 'hello ' . $name;
});

// fast parameter(s) support
$app->get_p('/hello/for/:p(/:p)', function($name, $surname ="") {
echo 'hello ' . $name . ' ' . $surname;
});

// custom MYOPTIONS method
$app->myoptions('/api/:var', function($var) {});

// groups
$app->group('/group', function() use ($app) {
echo 'i am in a group!';
$app->get('/hello', function() {
echo "hello in group!";
});
});