kitchenu / slim-debugbar
PHP Debugbar integration for Slim 3
Installs: 11 255
Dependents: 4
Suggesters: 0
Security: 0
Stars: 12
Watchers: 2
Forks: 5
Open Issues: 1
Requires
- php: >=5.5.0
- maximebf/debugbar: ^1.12.0
- psr/http-message: ^1.0
- slim/slim: ^3.0
Requires (Dev)
- phpunit/phpunit: ^4.0|^5.0
README
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