kitchenu/slim-debugbar

PHP Debugbar integration for Slim 3

v1.1.1 2018-07-29 16:58 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:49:12 UTC


README

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