INITIALIZE_CONSTRUCTOR
INITIALIZE_CONSTRUCTOR
Renders the debug bar using the client side javascript implementation
Generates all the needed initialization code of controls
__construct(\DebugBar\DebugBar $debugBar, string $baseUrl = null, string $basePath = null)
\DebugBar\DebugBar | $debugBar | |
string | $baseUrl | |
string | $basePath |
setOptions(array $options)
Sets options from an array
Options:
array | $options | [description] |
setInitialization(integer $init)
Sets what should be initialized
integer | $init |
addControl(string $name, array $options)
Adds a control to initialize
Possible options:
"icon" or "widget" are at least needed
string | $name | |
array | $options |
addAssets(array $cssFiles, array $jsFiles, string $basePath = null, string $baseUrl = null)
Add assets to render in the head
array | $cssFiles | An array of filenames |
array | $jsFiles | An array of filenames |
string | $basePath | Base path of those files |
string | $baseUrl | Base url of those files |
renderOnShutdown(boolean $here = true, boolean $initialize = true, boolean $renderStackedData = true, boolean $head = false) : string
Register shutdown to display the debug bar
boolean | $here | Set position of HTML. True if is to current position or false for end file |
boolean | $initialize | Whether to render the de bug bar initialization code |
boolean | $renderStackedData | |
boolean | $head |
Return "{--DEBUGBAR_OB_START_REPLACE_ME--}" or return an empty string if $here == false
replaceTagInBuffer(boolean $here = true, boolean $initialize = true, boolean $renderStackedData = true, boolean $head = false)
Is callback function for register_shutdown_function(.
..)
boolean | $here | Set position of HTML. True if is to current position or false for end file |
boolean | $initialize | Whether to render the de bug bar initialization code |
boolean | $renderStackedData | |
boolean | $head |
render(boolean $initialize = true, boolean $renderStackedData = true) : string
Returns the code needed to display the debug bar
AJAX request should not render the initialization code.
boolean | $initialize | Whether or not to render the debug bar initialization code |
boolean | $renderStackedData | Whether or not to render the stacked data |
getJsControlsDefinitionCode(string $varname) : string
Returns the js code needed to initialized the controls and data mapping of the debug bar
Controls can be defined by collectors themselves or using \addControl()
string | $varname | Debug bar's variable name |