Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZTemplateDebugFunction Class Reference
Template system » Template functions

Advanced debug handling. More...

## Public Member Functions
| __construct ( $timingPoint='debug-timing-point', $accumulator='debug-accumulator', $log='debug-log', $trace='debug-trace')
| functionList ()
| attributeList ()
| functionTemplateHints ()
| templateNodeTransformation ( $functionName, &$node, $tpl, $parameters, $privateData)
| process ( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace)
| hasChildren ()

## Public Attributes
| $TimingPointName
| $AccumulatorName
| $LogName
| $TraceName
| $DebugName
| $AppendDebugName
| $OnceName

## Detailed Description

Advanced debug handling.

debug-timing-point Starts a timing point, executes body and ends the timing point. This is useful if you want to figure out how fast a piece of template code goes or to see all debug entries that occur between these two points.

{debug-timing-point id=""}
{$item} - {$item2}
{/debug-timing-point}

debug-accumulator Executes the body and performs statistics. The number of calls, total time and average time will be shown in debug.

{debug-accumulator}
{section var=error loop=$errors}{$error}{/section}
{/debug-accumulator}

debug-log Does exactly the same as eZDebug::writeDebug() method. Has two parameters:

- var: variable to dump
- msg: text message

{debug-log var=$object msg='object contents'}
{debug-log msg='hello world'}
{debug-log var=array(1,2,3)}

debug-trace Executes the body while tracing the result using XDebug. The result will a trace file made by XDebug which can be analyzed. Note: This will not do anything when XDebug is not available

{debug-trace id="loop"}
{section var=error loop=$errors}{$error}{/section}
{/debug-trace}

Definition at line 62 of file eztemplatedebugfunction.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZTemplateDebugFunction::__construct | ( |  | $timingPoint = `'debug-timing-point'`,
|  |  | $accumulator = `'debug-accumulator'`,
|  |  | $log = `'debug-log'`,
|  |  | $trace = `'debug-trace'`
| ) |  |

Initializes the object with names.

Parameters

  string | $timingPoint |
  string | $accumulator |
  string | $log |
  string | $trace |

Definition at line 76 of file eztemplatedebugfunction.php.

## Member Function Documentation

## ◆ attributeList()

eZTemplateDebugFunction::attributeList | ( |  | ) |

Returns the attribute list. key: parameter name value: can have children

Definition at line 100 of file eztemplatedebugfunction.php.

Referenced by hasChildren().

## ◆ functionList()

eZTemplateDebugFunction::functionList | ( |  | ) |

Return the list of available functions.

Definition at line 90 of file eztemplatedebugfunction.php.

## ◆ functionTemplateHints()

eZTemplateDebugFunction::functionTemplateHints | ( |  | ) |

Definition at line 110 of file eztemplatedebugfunction.php.

## ◆ hasChildren()

eZTemplateDebugFunction::hasChildren | ( |  | ) |

Returns true.

Definition at line 418 of file eztemplatedebugfunction.php.

References attributeList().

## ◆ process()

eZTemplateDebugFunction::process | ( |  | $tpl,
|  | & | $textElements,
|  |  | $functionName,
|  |  | $functionChildren,
|  |  | $functionParameters,
|  |  | $functionPlacement,
|  |  | $rootNamespace,
|  |  | $currentNamespace
| ) |  |

Processes the function with all it's children.

Definition at line 279 of file eztemplatedebugfunction.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZDebug\addTimingPoint(), and eZDebug\writeDebug().

## ◆ templateNodeTransformation()

eZTemplateDebugFunction::templateNodeTransformation | ( |  | $functionName,
|  | & | $node,
|  |  | $tpl,
|  |  | $parameters,
|  |  | $privateData
| ) |  |

Definition at line 134 of file eztemplatedebugfunction.php.

References eZTemplateNodeTool\createCodePieceNode(), eZTemplateNodeTool\createVariableNode(), eZTemplateNodeTool\elementConstantValue(), eZTemplateNodeTool\extractFunctionNodeChildren(), eZTemplateNodeTool\extractFunctionNodePlacement(), and eZTemplateNodeTool\isConstantElement().

## Member Data Documentation

## ◆ $AccumulatorName

eZTemplateDebugFunction::$AccumulatorName

Definition at line 65 of file eztemplatedebugfunction.php.

## ◆ $AppendDebugName

eZTemplateDebugFunction::$AppendDebugName

Definition at line 426 of file eztemplatedebugfunction.php.

## ◆ $DebugName

eZTemplateDebugFunction::$DebugName

Name of the function

Definition at line 425 of file eztemplatedebugfunction.php.

## ◆ $LogName

eZTemplateDebugFunction::$LogName

Definition at line 66 of file eztemplatedebugfunction.php.

## ◆ $OnceName

eZTemplateDebugFunction::$OnceName

Definition at line 427 of file eztemplatedebugfunction.php.

## ◆ $TimingPointName

eZTemplateDebugFunction::$TimingPointName

Definition at line 64 of file eztemplatedebugfunction.php.

## ◆ $TraceName

eZTemplateDebugFunction::$TraceName

Definition at line 67 of file eztemplatedebugfunction.php.

The documentation for this class was generated from the following file:

- eztemplatedebugfunction.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.