/Slim-DebugBar

Slim Debugbar (Integrates PHP Debug Bar)

Primary LanguagePHP

Slim Debugbar

Build Status Packagist License

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);

Read the documentation for more bridge collectors