Debugger class
Framework\Debug\Debugger
Class Debugger.
Defined in libraries/debug/src/Debugger.php
Properties #
- $collections
- Contains the Collections. Keys are the names and values are the Collections.
- $options
- Contains the debug options. The keys are the names of the options.
- $debugbarView
- Contains the path to the debugbar view file.
- $debugbarEnabled
- Tells if the debugbar is enabled.
$collections
Contains the Collections. Keys are the names and values are the Collections.
$options
Contains the debug options. The keys are the names of the options.
$debugbarView
Contains the path to the debugbar view file.
$debugbarEnabled
Tells if the debugbar is enabled.
Methods #
- addCollection()
- Add a new Collection.
- addCollector()
- Add a collector to a collection.
- convertSize()
- Convert size to unit of measurement.
- disableDebugbar()
- Disables debugbar rendering.
- enableDebugbar()
- Enables debugbar rendering.
- getActivities()
- Get an array with the minimum, maximum, and total execution times for all activities. Also, returns an array with all collected activities.
- getCollection()
- Get a Collection by name.
- getCollections()
- Get all Collections.
- getDebugbarView()
- Get the path of the debugbar view.
- getOption()
- Get the value of a debug option.
- getOptions()
- Get all debug options.
- isDebugbarEnabled()
- Tells if debugbar rendering is enabled.
- makeDebugValue()
- Make a value into a debug value.
- makeSafeName()
- Replace a list of characters with hyphens.
- renderDebugbar()
- Render the debug bar, if it is enabled.
- roundSecondsToMilliseconds()
- Round seconds to milliseconds.
- roundVersion()
- Remove dots and zeros from the end of the version.
- setDebugbarView()
- Set the path of the debugbar view.
- setOption()
- Set a debug option.
- setOptions()
- Set all debug options.
- addActivityValues()
- Updates the $activity variable.
addCollection()
Add a new Collection.
- \Framework\Debug\Collection $collection
addCollector()
Add a collector to a collection.
If a collection with the given name does not exist, a new one will be
created.
- \Framework\Debug\Collector $collector - The collector
- string $collectionName - The name of the collection
convertSize()
Convert size to unit of measurement.
- int|float $size - The size in bytes
disableDebugbar()
Disables debugbar rendering.
enableDebugbar()
Enables debugbar rendering.
getActivities()
Get an array with the minimum, maximum, and total execution times for all activities. Also, returns an array with all collected activities.
getCollection()
Get a Collection by name.
- string $name - The name of the Collection
getCollections()
Get all Collections.
getDebugbarView()
Get the path of the debugbar view.
getOption()
Get the value of a debug option.
- string $name - The name of the option
getOptions()
Get all debug options.
isDebugbarEnabled()
Tells if debugbar rendering is enabled.
makeDebugValue()
Make a value into a debug value.
- mixed $value - Any value
makeSafeName()
Replace a list of characters with hyphens.
- string $name - The name to be updated
renderDebugbar()
Render the debug bar, if it is enabled.
roundSecondsToMilliseconds()
Round seconds to milliseconds.
- int|float $seconds - The number of seconds
- int $precision - The number of decimal digits to round
roundVersion()
Remove dots and zeros from the end of the version.
- string $version - The version
setDebugbarView()
Set the path of the debugbar view.
- string $file - The view file path
setOption()
Set a debug option.
- string $name - The name of the option
- mixed $value - The value of the option
setOptions()
Set all debug options.
- array $options - All options
addActivityValues()
Updates the $activity variable.
Adds the "total" key representing the total execution time.
Adds the "left" and "width" keys representing the CSS `margin-left` and
`width` properties used to create the time bar.
- array $activity - Current activity
- float $min - The minimum time of the collected activities
- float $max - The maximum time of collected activities