juliangut/slim-booboo-middleware

Slim Framework BooBoo middleware

0.1 2015-03-15 21:42 UTC

This package is auto-updated.

Last update: 2024-10-15 11:47:40 UTC


README

Build Status Code Climate Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads

Juliangut Slim Framework BooBoo handler middleware

BooBoo error handler middleware for Slim Framework.

Uses BooBoo error handler library by The PHP League

Installation

Best way to install is using Composer:

php composer.phar require juliangut/slim-booboo-middleware

Then require_once the autoload file:

require_once './vendor/autoload.php';

Usage

Add as middleware. BooBoo middleware will automatically register BooBoo to handle errors.

BooBooMiddleware can handle creation of formatters.

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.

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

See file CONTRIBUTING.md

License

Release under BSD-3-Clause License.

See file LICENSE included with the source code for a copy of the license terms