DebugBar
extends StandardDebugBar
in package
Class DebugBar
Extends the standard DebugBar to provide shortcuts to the collections
Tags
Table of Contents
- __construct() : mixed
- DebugBar constructor.
- addException() : mixed
- This is a shorthand for adding exceptions to the exception collection.
- addMessage() : mixed
- This is a shorthand for adding messages to the message collection.
- measure() : mixed
- This is a shorthand for measuring the execution of a closure.
- startMeasure() : mixed
- This is a shorthand for starting a time measurement.
- stopMeasure() : mixed
- This is a shorthand for stopping a time measurement.
Methods
__construct()
DebugBar constructor.
public
__construct() : mixed
Return values
mixed —addException()
This is a shorthand for adding exceptions to the exception collection.
public
static addException(Exception $exception) : mixed
Parameters
- $exception : Exception
-
The exception to add to the exception collection.
Return values
mixed —addMessage()
This is a shorthand for adding messages to the message collection.
public
static addMessage(string $message[, string $label = 'info' ][, bool $isString = true ]) : mixed
Parameters
- $message : string
-
The message to add to the debug bar messages collection
- $label : string = 'info'
-
The debug level, choose between info, error and warning
- $isString : bool = true
-
Whether the message is a string or something else
Return values
mixed —measure()
This is a shorthand for measuring the execution of a closure.
public
static measure(string $label, Closure $closure) : mixed
Parameters
- $label : string
-
Public name.
- $closure : Closure
-
Closure to be executed.
Return values
mixed —startMeasure()
This is a shorthand for starting a time measurement.
public
static startMeasure(string $name[, string|null $label = null ][, string|null $collector = null ]) : mixed
Parameters
- $name : string
-
Internal name, used to stop the measure.
- $label : string|null = null
-
Public name.
- $collector : string|null = null
-
The source of the collector.
Return values
mixed —stopMeasure()
This is a shorthand for stopping a time measurement.
public
static stopMeasure(string $name) : mixed
Parameters
- $name : string
-
Internal name, used to stop the measure.