, (*1)
Juliangut Slim Framework BooBoo handler middleware
BooBoo error handler middleware for Slim Framework., (*2)
Uses BooBoo error handler library by The PHP League, (*3)
Installation
Best way to install is using Composer:, (*4)
php composer.phar require juliangut/slim-booboo-middleware
Then require_once the autoload file:, (*5)
require_once './vendor/autoload.php';
Usage
Add as middleware.
BooBoo middleware will automatically register BooBoo to handle errors., (*6)
BooBooMiddleware can handle creation of formatters., (*7)
use Slim\Slim;
use Jgut\Slim\Middleware\BooBooMiddleware;
$app = new Slim();
$app->add((new BooBooMiddleware())
->addFormatter('command-line')
->addFormatter('\League\BooBoo\Formatter\NullFormatter', E_NOTICE)
);
But BooBoo Middleware cannot handle creation of handlers., (*8)
use Slim\Slim;
use Jgut\Slim\Middleware\BooBooMiddleware;
$yourHandler = new \yourHandler();
$app = new Slim();
$app->add((new BooBooMiddleware())
->addFormatter('null', E_NOTICE)
->addHandler($yourHandler)
);
Contributing
Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before, (*9)
See file CONTRIBUTING.md, (*10)
License
Release under BSD-3-Clause License.
See file LICENSE included with the source code for a copy of the license terms, (*11)