eZPublish  4.5
eZTemplateDebugFunction Class Reference

Advanced debug handling. More...

Public Member Functions

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

Public Attributes

 Name of the function. More...

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-accumulator Executes the body and performs statistics. The number of calls, total time and average time will be shown in debug.

{section var=error loop=$errors}{$error}{/section}

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}

Member Function Documentation

eZTemplateDebugFunction::attributeList ( )

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

Referenced by hasChildren().

eZTemplateDebugFunction::eZTemplateDebugFunction (   $timingPoint = 'debug-timing-point',
  $accumulator = 'debug-accumulator',
  $log = 'debug-log',
  $trace = 'debug-trace' 

Initializes the object with names.

eZTemplateDebugFunction::functionList ( )

Return the list of available functions.

eZTemplateDebugFunction::functionTemplateHints ( )
eZTemplateDebugFunction::hasChildren ( )

Returns true.

eZTemplateDebugFunction::process (   $tpl,

Processes the function with all it's children.

eZTemplateDebugFunction::templateNodeTransformation (   $functionName,

Member Data Documentation


Name of the function.


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