Files
extends BaseCollector
in package
Files collector
Table of Contents
- $hasLabel : bool
- Whether this collector needs to display a label or not.
- $hasTabContent : bool
- Whether this collector needs to display content in a tab or not.
- $hasTimeline : bool
- Whether this collector has data that can be displayed in the Timeline.
- $hasVarData : bool
- Whether this collector has data that should be shown in the Vars tab.
- $title : string
- The 'title' of this Collector.
- cleanPath() : string
- Clean Path
- display() : array<string|int, mixed>
- Returns the data of this collector to be formatted in the toolbar
- getAsArray() : array<string|int, mixed>
- Return settings as an array.
- getBadgeValue() : int
- Displays the number of included files as a badge in the tab button.
- getTitle() : string
- Gets the Collector's title.
- getTitleDetails() : string
- Returns any information that should be shown next to the title.
- getVarData() : mixed
- Gets a collection of data that should be shown in the 'Vars' tab.
- hasLabel() : bool
- Does this collector have a label?
- hasTabContent() : bool
- Does this collector need it's own tab?
- hasTimelineData() : bool
- Does this collector have information for the timeline?
- hasVarData() : bool
- Does this Collector have data that should be shown in the 'Vars' tab?
- icon() : string
- Display the icon.
- isEmpty() : bool
- Does this collector have any data collected?
- timelineData() : array<string|int, mixed>
- Grabs the data for the timeline, properly formatted, or returns an empty array.
- formatTimelineData() : array<string|int, mixed>
- Child classes should implement this to return the timeline data formatted for correct usage.
Properties
$hasLabel
Whether this collector needs to display a label or not.
protected
bool
$hasLabel
= false
$hasTabContent
Whether this collector needs to display content in a tab or not.
protected
bool
$hasTabContent
= true
$hasTimeline
Whether this collector has data that can be displayed in the Timeline.
protected
bool
$hasTimeline
= false
$hasVarData
Whether this collector has data that should be shown in the Vars tab.
protected
bool
$hasVarData
= false
$title
The 'title' of this Collector.
protected
string
$title
= 'Files'
Used to name things in the toolbar HTML.
Methods
cleanPath()
Clean Path
public
cleanPath(string $file) : string
This makes nicer looking paths for the error output.
Parameters
- $file : string
Return values
string —display()
Returns the data of this collector to be formatted in the toolbar
public
display() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAsArray()
Return settings as an array.
public
getAsArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —getBadgeValue()
Displays the number of included files as a badge in the tab button.
public
getBadgeValue() : int
Return values
int —getTitle()
Gets the Collector's title.
public
getTitle([bool $safe = false ]) : string
Parameters
- $safe : bool = false
Return values
string —getTitleDetails()
Returns any information that should be shown next to the title.
public
getTitleDetails() : string
Return values
string —getVarData()
Gets a collection of data that should be shown in the 'Vars' tab.
public
getVarData() : mixed
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' ], ];
Return values
mixed —hasLabel()
Does this collector have a label?
public
hasLabel() : bool
Return values
bool —hasTabContent()
Does this collector need it's own tab?
public
hasTabContent() : bool
Return values
bool —hasTimelineData()
Does this collector have information for the timeline?
public
hasTimelineData() : bool
Return values
bool —hasVarData()
Does this Collector have data that should be shown in the 'Vars' tab?
public
hasVarData() : bool
Return values
bool —icon()
Display the icon.
public
icon() : string
Icon from https://icons8.com - 1em package
Return values
string —isEmpty()
Does this collector have any data collected?
public
isEmpty() : bool
If not, then the toolbar button won't get shown.
Return values
bool —timelineData()
Grabs the data for the timeline, properly formatted, or returns an empty array.
public
timelineData() : array<string|int, mixed>
Return values
array<string|int, mixed> —formatTimelineData()
Child classes should implement this to return the timeline data formatted for correct usage.
protected
formatTimelineData() : array<string|int, mixed>
Timeline data should be formatted into arrays that look like:
[ 'name' => 'Database::Query', 'component' => 'Database', 'start' => 10 // milliseconds 'duration' => 15 // milliseconds ]