Documentation

DebugExtension extends AbstractExtension
in package

Table of Contents

ARRAY_CAPTION  = 'Array variables'
COMPONENT_CAPTION  = 'Component variables'
OBJECT_CAPTION  = 'Object variables'
PAGE_CAPTION  = 'Page variables'
$blockMethods  : array<string|int, mixed>
$commentMap  : array<string|int, mixed>
$controller  : Controller
$variablePrefix  : bool
$zebra  : int
__construct()  : mixed
Creates the extension instance.
dump()  : void
Dump information about a variable
getFilters()  : array<string|int, TwigFilter>
Returns a list of filters to add to the existing list.
getFunctions()  : array<string|int, mixed>
Returns a list of global functions to add to the existing list.
getNodeVisitors()  : array<string|int, NodeVisitorInterface>
Returns the node visitor instances to add to the existing list.
getOperators()  : array<string|int, array<string|int, mixed>>
Returns a list of operators to add to the existing list.
getTests()  : array<string|int, TwigTest>
Returns a list of tests to add to the existing list.
getTokenParsers()  : array<string|int, TokenParserInterface>
Returns the token parser instances to add to the existing list.
runDump()  : string
Processes the dump variables, if none is supplied, all the twig template variables are used
arrayToCss()  : string
Convert a key/value pair array into a CSS string
evalArrDesc()  : string
Evaluate an array type for description
evalDocBlock()  : string
Extracts the comment from a DocBlock
evalKeyLabel()  : string
Returns a variable name as HTML friendly.
evalMethodDesc()  : string
Evaluate an method type for description
evalObjDesc()  : string
Evaluate an object type for description
evalObjLabel()  : string
Evaluate an object type for label
evalToggleDumpOnClick()  : string
Builds JavaScript for toggling the dump container
evalVarDesc()  : string
Evaluate the variable description
evalVarDump()  : string
Dumps a variable using HTML Dumper, wrapped in a hidden DIV element.
evalVarLabel()  : string
Evaluate the variable description
getContainerCss()  : string
Get the CSS string for the output container
getDataCss()  : string
Get the CSS string for the output data
getHeaderCss()  : string
Get the CSS string for the output header
getSubheaderCss()  : string
Get the CSS string for the output subheader
getType()  : string
Evaluate an object type for label
makeTableHeader()  : string
Builds the HTML used for the table header.
makeTableRow()  : string
Builds the HTML used for each table row.
objectToArray()  : array<string|int, mixed>
Returns a map of an object as an array, containing methods and properties.
paginatorToArray()  : array<string|int, mixed>
Returns default comment information for a paginator object.

Constants

COMPONENT_CAPTION

public mixed COMPONENT_CAPTION = 'Component variables'

Properties

$blockMethods

protected array<string|int, mixed> $blockMethods = ['componentDetails', 'defineProperties', 'getPropertyOptions', 'offsetExists', 'offsetGet', 'offsetSet', 'offsetUnset']

Blocked object methods that should not be included in the dump.

$commentMap

protected array<string|int, mixed> $commentMap = []

Collection of method/property comments.

$variablePrefix

protected bool $variablePrefix = false

If no variable is passed, true.

$zebra

protected int $zebra = 1

Helper for rendering table row styles.

Methods

__construct()

Creates the extension instance.

public __construct(Controller $controller) : mixed
Parameters
$controller : Controller

The CMS controller object.

Return values
mixed

dump()

Dump information about a variable

public dump([mixed $variables = null ][, mixed $caption = null ]) : void
Parameters
$variables : mixed = null

Variable to dump

$caption : mixed = null

Caption [and subcaption] of the dump

Return values
void

getFunctions()

Returns a list of global functions to add to the existing list.

public getFunctions() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array of global functions

getOperators()

Returns a list of operators to add to the existing list.

public getOperators() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>

First array of unary operators, second array of binary operators

getTests()

Returns a list of tests to add to the existing list.

public getTests() : array<string|int, TwigTest>
Return values
array<string|int, TwigTest>

runDump()

Processes the dump variables, if none is supplied, all the twig template variables are used

public runDump(Environment $env, array<string|int, mixed> $context) : string
Parameters
$env : Environment
$context : array<string|int, mixed>
Return values
string

arrayToCss()

Convert a key/value pair array into a CSS string

protected arrayToCss(array<string|int, mixed> $rules) : string
Parameters
$rules : array<string|int, mixed>

List of rules to process

Return values
string

evalArrDesc()

Evaluate an array type for description

protected evalArrDesc(array<string|int, mixed> $variable) : string
Parameters
$variable : array<string|int, mixed>
Return values
string

evalDocBlock()

Extracts the comment from a DocBlock

protected evalDocBlock(ReflectionClass $reflectionObj) : string
Parameters
$reflectionObj : ReflectionClass
Return values
string

evalKeyLabel()

Returns a variable name as HTML friendly.

protected evalKeyLabel(string $key) : string
Parameters
$key : string
Return values
string

evalMethodDesc()

Evaluate an method type for description

protected evalMethodDesc(object $variable) : string
Parameters
$variable : object
Return values
string

evalObjDesc()

Evaluate an object type for description

protected evalObjDesc(array<string|int, mixed> $variable) : string
Parameters
$variable : array<string|int, mixed>
Return values
string

evalObjLabel()

Evaluate an object type for label

protected evalObjLabel(object $variable) : string
Parameters
$variable : object
Return values
string

evalToggleDumpOnClick()

Builds JavaScript for toggling the dump container

protected evalToggleDumpOnClick() : string
Return values
string

evalVarDesc()

Evaluate the variable description

protected evalVarDesc(mixed $variable, mixed $key) : string
Parameters
$variable : mixed
$key : mixed
Return values
string

evalVarDump()

Dumps a variable using HTML Dumper, wrapped in a hidden DIV element.

protected evalVarDump(mixed $variable) : string
Parameters
$variable : mixed
Return values
string

evalVarLabel()

Evaluate the variable description

protected evalVarLabel(mixed $variable) : string
Parameters
$variable : mixed
Return values
string

getContainerCss()

Get the CSS string for the output container

protected getContainerCss() : string
Return values
string

getDataCss()

Get the CSS string for the output data

protected getDataCss(mixed $variable) : string
Parameters
$variable : mixed
Return values
string

getHeaderCss()

Get the CSS string for the output header

protected getHeaderCss() : string
Return values
string

getSubheaderCss()

Get the CSS string for the output subheader

protected getSubheaderCss() : string
Return values
string

getType()

Evaluate an object type for label

protected getType(object $variable) : string
Parameters
$variable : object
Return values
string

makeTableHeader()

Builds the HTML used for the table header.

protected makeTableHeader(mixed $caption) : string
Parameters
$caption : mixed

Caption [and subcaption] of the dump

Return values
string

makeTableRow()

Builds the HTML used for each table row.

protected makeTableRow(mixed $key, mixed $variable) : string
Parameters
$key : mixed
$variable : mixed
Return values
string

objectToArray()

Returns a map of an object as an array, containing methods and properties.

protected objectToArray(mixed $object) : array<string|int, mixed>
Parameters
$object : mixed
Return values
array<string|int, mixed>

paginatorToArray()

Returns default comment information for a paginator object.

protected paginatorToArray(Paginator $paginator) : array<string|int, mixed>
Parameters
$paginator : Paginator
Return values
array<string|int, mixed>

Search results