Properties

$hasTimeline

$hasTimeline : boolean

Whether this collector has data that can be displayed in the Timeline.

Type

boolean

$hasTabContent

$hasTabContent : boolean

Whether this collector needs to display content in a tab or not.

Type

boolean

$hasLabel

$hasLabel : boolean

Whether this collector needs to display a label or not.

Type

boolean

$hasVarData

$hasVarData : boolean

Whether this collector has data that should be shown in the Vars tab.

Type

boolean

$title

$title : string

The 'title' of this Collector.

Used to name things in the toolbar HTML.

Type

string

$data

$data : array

Our collected data.

Type

array

Methods

getTitle()

getTitle(boolean  $safe = false) : string

Gets the Collector's title.

Parameters

boolean $safe

Returns

string

getTitleDetails()

getTitleDetails() : string

Returns any information that should be shown next to the title.

Returns

string

hasTabContent()

hasTabContent() : boolean

Does this collector need it's own tab?

Returns

boolean

hasLabel()

hasLabel() : boolean

Does this collector have a label?

Returns

boolean

hasTimelineData()

hasTimelineData() : boolean

Does this collector have information for the timeline?

Returns

boolean

timelineData()

timelineData() : array

Grabs the data for the timeline, properly formatted, or returns an empty array.

Returns

array

hasVarData()

hasVarData() : boolean

Does this Collector have data that should be shown in the 'Vars' tab?

Returns

boolean

getVarData()

getVarData() : null

Gets a collection of data that should be shown in the 'Vars' tab.

The format is an array of sections, each with their own array of key/value pairs:

$data = [ 'section 1' => [ 'foo' => 'bar, 'bar' => 'baz' ], 'section 2' => [ 'foo' => 'bar, 'bar' => 'baz' ], ];

Returns

null

display()

display() : array

Returns the data of this collector to be formatted in the toolbar

Returns

array

cleanPath()

cleanPath(string  $file) : string

Clean Path

This makes nicer looking paths for the error output.

Parameters

string $file

Returns

string

getBadgeValue()

getBadgeValue() : null

Gets the "badge" value for the button.

Returns

null

isEmpty()

isEmpty() : boolean

Does this collector actually have any data to display?

If not, then the toolbar button won't get shown.

Returns

boolean

icon()

icon() : string

Display the icon.

Icon from https://icons8.com - 1em package

Returns

string

getAsArray()

getAsArray() : array

Return settings as an array.

Returns

array

formatTimelineData()

formatTimelineData() : array

Child classes should implement this to return the timeline data formatted for correct usage.

Timeline data should be formatted into arrays that look like:

[ 'name' => 'Database::Query', 'component' => 'Database', 'start' => 10 // milliseconds 'duration' => 15 // milliseconds ]

Returns

array

collectLogs()

collectLogs() 

Ensures the data has been collected.