fijma / cobber
A miniscule web framework for PHP, inspired by Rack.
v1.0.2
2015-12-27 09:14 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: >=3.7
This package is not auto-updated.
Last update: 2024-12-21 19:47:45 UTC
README
Cobber is a miniscule PHP web framework, inspired by rack.
$app = new Cobber(function($env) { return [200, [], ["G'day mate!"]]; });
$app->run();
Cobber accepts your app as a classname, instance, or closure. Just pass it in on instantiation.
Cobber supports middlewares. They can be loaded on instantiation:
$middlewares = [['MyMiddleware', ['some', 'optional', 'options']]];
$app = new Cobber($myapp, $middlewares);
$app->run();
or added via the add() method:
$app = new Cobber($myapp);
$app->add('MyMiddleware', ['some', 'optional', 'options']);
$app->run();