eZPublish  3.8
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)
 

Private Attributes

 $AppendDebugName
 
 $DebugName
 Name of the function. More...
 
 $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}

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,
$textElements,
  $functionName,
  $functionChildren,
  $functionParameters,
  $functionPlacement,
  $rootNamespace,
  $currentNamespace 
)

Processes the function with all it's children.

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

Member Data Documentation

eZTemplateDebugFunction::$AppendDebugName
private
eZTemplateDebugFunction::$DebugName
private

Name of the function.

eZTemplateDebugFunction::$OnceName
private

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