DebugBarHelper
extends Instanceable
in package
Class to help integrate the PHPDebugBar with NamelessMC.
Tags
Table of Contents
Properties
- $_debugBar : DebugBar|null
- $_instances : array<class-string, static>
- Stores instances of classes with their class name as key.
Methods
- addCollector() : void
- addSmartyCollector() : void
- addTwigCollector() : void
- enable() : void
- Enable the PHPDebugBar.
- getDebugBar() : DebugBar|null
- getInstance() : static
- Get or make an instance of the class this was called on.
Properties
$_debugBar
private
DebugBar|null
$_debugBar
= \null
$_instances
Stores instances of classes with their class name as key.
private
static array<class-string, static>
$_instances
= []
Methods
addCollector()
public
addCollector(DataCollector $collector) : void
Parameters
- $collector : DataCollector
addSmartyCollector()
public
addSmartyCollector(Smarty $smarty) : void
Parameters
- $smarty : Smarty
addTwigCollector()
public
addTwigCollector(Environment $twig, Profile $profile) : void
Parameters
- $twig : Environment
- $profile : Profile
enable()
Enable the PHPDebugBar.
public
enable() : void
getDebugBar()
public
getDebugBar() : DebugBar|null
Return values
DebugBar|nullgetInstance()
Get or make an instance of the class this was called on.
public
final static getInstance() : static
Return values
static —Instance of the class this was called on.