juliangut / slim-booboo-middleware
Slim Framework BooBoo middleware
0.1
2015-03-15 21:42 UTC
Requires
- php: >=5.4
- league/booboo: ~1.0
- slim/slim: ~2.5
Requires (Dev)
- phpmd/phpmd: ~2.2
- phpunit/phpunit: ~4.5
- sebastian/phpcpd: ~2.0
- squizlabs/php_codesniffer: ~2
This package is auto-updated.
Last update: 2024-10-15 11:47:40 UTC
README
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