Documentation

Toolbar
in package

Debug Toolbar

Displays a toolbar with bits of stats to aid a developer in debugging.

Inspiration: http://prophiler.fabfuel.de

Table of Contents

$collectors  : array<string|int, BaseCollector>
Collectors to be used and displayed.
$config  : Toolbar
Toolbar configuration settings.
__construct()  : mixed
Constructor
prepare()  : void
Prepare for debugging.
respond()  : mixed
Inject debug toolbar into the response.
run()  : string
Returns all the data required by Debug Bar
collectTimelineData()  : array<string|int, mixed>
Returns a sorted array of timeline data arrays from the collectors.
collectVarData()  : array<string|int, mixed>
Returns an array of data from all of the modules that should be displayed in the 'Vars' tab.
format()  : string
Format output
renderTimeline()  : string
Called within the view to display the timeline itself.
roundTo()  : float
Rounds a number to the nearest incremental value.

Properties

$collectors

Collectors to be used and displayed.

protected array<string|int, BaseCollector> $collectors = []

Methods

__construct()

Constructor

public __construct(Toolbar $config) : mixed
Parameters
$config : Toolbar
Return values
mixed

respond()

Inject debug toolbar into the response.

public respond() : mixed
Return values
mixed

collectTimelineData()

Returns a sorted array of timeline data arrays from the collectors.

protected collectTimelineData(array<string|int, mixed> $collectors) : array<string|int, mixed>
Parameters
$collectors : array<string|int, mixed>
Return values
array<string|int, mixed>

collectVarData()

Returns an array of data from all of the modules that should be displayed in the 'Vars' tab.

protected collectVarData() : array<string|int, mixed>
Return values
array<string|int, mixed>

format()

Format output

protected format(string $data[, string $format = 'html' ]) : string
Parameters
$data : string

JSON encoded Toolbar data

$format : string = 'html'

html, json, xml

Return values
string

renderTimeline()

Called within the view to display the timeline itself.

protected renderTimeline(array<string|int, mixed> $collectors, float $startTime, int $segmentCount, int $segmentDuration, array<string|int, mixed> &$styles) : string
Parameters
$collectors : array<string|int, mixed>
$startTime : float
$segmentCount : int
$segmentDuration : int
$styles : array<string|int, mixed>
Return values
string

roundTo()

Rounds a number to the nearest incremental value.

protected roundTo(float $number[, int $increments = 5 ]) : float
Parameters
$number : float
$increments : int = 5
Return values
float

Search results