middlewares/debugbar

Middleware to insert PHP DebugBar automatically in html responses

v1.1.0 2018-08-04 10:41 UTC

README

Latest Version on Packagist Software License Build Status Quality Score Total Downloads SensioLabs Insight

Middleware to insert PHP DebugBar automatically in html responses.

Requirements

Installation

This package is installable and autoloadable via Composer as middlewares/debugbar.

composer require middlewares/debugbar

Example

$dispatcher = new Dispatcher([
	new Middlewares\Debugbar()
]);

$response = $dispatcher->dispatch(new ServerRequest());

Options

__construct(DebugBar\DebugBar $debugbar = null)

To use a custom DebugBar instance. If it's not defined, an intance of DebugBar\StandardDebugBar will be created.

captureAjax(bool $captureAjax = true)

Set true to capture ajax requests and send the data in the headers (disabled by default).

inline(bool $inline = true)

Set true to dump the js/css code inline in the html.

responseFactory(Psr\Http\Message\ResponseFactoryInterface $responseFactory)

A PSR-17 factory to create the responses.

streamFactory(Psr\Http\Message\StreamFactoryInterface $streamFactory)

A PSR-17 factory to create the response bodies.

Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.

The MIT License (MIT). Please see LICENSE for more information.