kitchenu/slim-debugbar

PHP Debugbar integration for Slim 3

v1.0.1 2016-12-26 06:53 UTC

README

Build Status

This is a package to integrate PHP Debug Bar with Slim 3.

Installation

Require this package with composer:

composer require kitchenu/slim-debugbar

Register a Provider

$app = new Slim\App();

$provider = new Kitchenu\Debugbar\ServiceProvider();
$provider->register($app);

Bridge collectors

$container = $app->getContainer();

$container['pdo'] = function () {
    return new PDO('sqlite::memory:');
};

$collector = new DebugBar\DataCollector\PDO\PDOCollector($container->pdo);
$container->debugbar->addCollector($collector);