marcoazn89 / slim-booboo
Booboo's integration for Slim3.0 framework
dev-master
2016-09-08 17:17 UTC
Requires
- php: >=5.3.0
- marcoazn89/booboo: ^2.0
This package is not auto-updated.
Last update: 2026-03-29 01:55:58 UTC
README
BooBoo's integration for Slim3.0 framework
Install via Composer
composer require marcoazn89/slim-booboo:dev-master
Set up
$app->add(new \SlimBooboo\Middleware());
Overwrite default templates
// configArray overwrites the default error templates. Example: $configArray= [ 'html' => 'some/folder/html.php', 'json' => 'some/folder/json.php' ]; $app->add(new \SlimBooboo\Middleware($configArray));
Example
require '../vendor/autoload.php'; $app = new \Slim\App(); $app->add(new \SlimBooboo\Middleware()); $app->get('/exception/', function($req, $res, $arg) { throw new Exception("Error Processing Request", 1); }); $app->get('/error/', function($req, $res, $arg) { $a->B(); }); $app->run();