\CodeIgniter\DebugToolbar

Debug Toolbar

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

Inspiration: http://prophiler.fabfuel.de

Summary

Methods
Properties
Constants
__construct()
run()
prepare()
respond()
No public properties found
No constants found
renderTimeline()
collectTimelineData()
collectVarData()
roundTo()
format()
$config
$collectors
N/A
No private methods found
No private properties found
N/A

Properties

Methods

run()

run(float  $startTime, float  $totalTime, \CodeIgniter\HTTP\RequestInterface  $request, \CodeIgniter\HTTP\ResponseInterface  $response) : string

Returns all the data required by Debug Bar

Parameters

float $startTime

App start time

float $totalTime
\CodeIgniter\HTTP\RequestInterface $request
\CodeIgniter\HTTP\ResponseInterface $response

Returns

string —

JSON encoded data

respond()

respond() 

Inject debug toolbar into the response.

renderTimeline()

renderTimeline(array  $collectors, float  $startTime, integer  $segmentCount, integer  $segmentDuration, array  $styles) : string

Called within the view to display the timeline itself.

Parameters

array $collectors
float $startTime
integer $segmentCount
integer $segmentDuration
array $styles

Returns

string

collectTimelineData()

collectTimelineData(array  $collectors) : array

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

Parameters

array $collectors

Returns

array

collectVarData()

collectVarData() : array

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

Returns

array

roundTo()

roundTo(float  $number, integer  $increments = 5) : float

Rounds a number to the nearest incremental value.

Parameters

float $number
integer $increments

Returns

float

format()

format(string  $data, string  $format = 'html') : string

Format output

Parameters

string $data

JSON encoded Toolbar data

string $format

html, json, xml

Returns

string