Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Static Protected Attributes | Private Member Functions | List of all members
eZTemplate Class Reference
Template system

The main manager for templates. More...

## Public Member Functions
| __construct ()
| leftDelimiter ()
| rightDelimiter ()
| setLeftDelimiter ( $delim)
| setRightDelimiter ( $delim)
| display ( $template=false, $extraParameters=false)
| createLocalVariablesList ()
| hasLocalVariable ( $varName, $rootNamespace)
| setLocalVariable ( $varName, $varValue, $rootNamespace)
| unsetLocalVariable ( $varName, $rootNamespace)
| unsetLocalVariables ()
| destroyLocalVariablesList ()
| fetch ( $template=false, $extraParameters=false, $returnResourceData=false)
| process ( $root, &$text, $rootNamespace, $currentNamespace)
| processNode ( $node, &$textElements, $rootNamespace, $currentNamespace)
| processVariable (&$textElements, $variableData, $variablePlacement, $rootNamespace, $currentNamespace)
| processFunction ( $functionName, &$textElements, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace)
| fetchFunctionObject ( $functionName)
| load ( $uri, $extraParameters=false, $returnResourceData=false)
| parse ( $sourceText, &$rootElement, $rootNamespace, &$resourceData)
| loadURIData ( $resourceObject, $uri, $resourceName, $template, &$extraParameters, $displayErrors=true)
| loadURIRoot ( $uri, $displayErrors, &$extraParameters)
| processURI ( $uri, $displayErrors, &$extraParameters, &$textElements, $rootNamespace, $currentNamespace)
| canCompileTemplate ( $resourceData, &$extraParameters)
| validateTemplateFile ( $file, $returnResourceData=false)
| compileTemplateFile ( $file, $returnResourceData=false)
| compileTemplate (&$resourceData, &$extraParameters)
| executeCompiledTemplate (&$resourceData, &$textElements, $rootNamespace, $currentNamespace, &$extraParameters)
| resourceFor ( $uri, &$res, &$template)
| resourceHandler ( $resourceName)
| hasChildren (&$function, $functionName)
| emptyVariable ()
| elementValue (&$dataElements, $rootNamespace, $currentNamespace, $placement=false, $checkExistance=false, $checkForProxy=false)
| expandAttributes ( $attributeList, $chooseText, $maxThreshold, $minThreshold=1)
| processOperator ( $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$valueData, $placement=false, $checkExistance=false)
| attributeValue (&$data, $nspace)
| variableText ( $var, $namespace="", $attrs=array())
| operatorParameterList ( $name)
| doOperator ( $element, &$namespace, &$current_nspace, &$value, $operatorName, $operatorParameters, &$named_params)
| doFunction ( $name, $func_obj, $nspace, $current_nspace)
| setVariable ( $var, $val, $namespace='', $scopeSafe=false)
| unsetVariable ( $var, $namespace='')
| hasVariable ( $var, $namespace='', $attrs=null)
| variable ( $var, $namespace='', $attrs=null)
| variableAttribute ( $var, $attrs)
| appendElement (&$text, $item, $nspace, $name)
| appendElementText (&$textElements, $item, $nspace, $name)
| appendDebugNodes (&$root, &$resourceData)
| registerFunctions (&$functionObject)
| registerAutoloadFunctions ( $functionDefinition)
| loadAndRegisterFunctions ( $functionDefinition)
| registerFunction ( $func_name, $func_obj)
| registerLiteral ( $func_name)
| unregisterLiteral ( $func_name)
| registerAutoloadOperators ( $operatorDefinition)
| loadAndRegisterOperators ( $operatorDefinition)
| registerOperators (&$operatorObject)
| registerOperatorsInternal ( $operatorObject, $debug=false)
| registerOperator ( $op_name, $op_obj)
| unregisterOperator ( $op_name)
| registerFilter ()
| registerResource ( $res)
| unregisterResource ( $res_name)
| setShowDetails ( $show)
| missingParameter ( $name, $param)
| extraParameters ( $name, $count, $maxCount)
| undefinedVariable ( $name, $var)
| undefinedFunction ( $func_name)
| placementText ( $placement=false)
| warning ( $name, $txt, $placement=false)
| error ( $name, $txt, $placement=false)
| operatorInputSupported ( $operatorName)
| setIncludeText ( $uri, $text)
| setIncludeOutput ( $uri, $output)
| autoloadPathList ()
| setAutoloadPathList ( $pathList)
| autoload ()
| resetVariables ()
| resetElements ()
| reset ()
| errorCount ()
| hasErrors ()
| errorLog ()
| warningCount ()
| hasWarnings ()
| warningLog ()
| ini ()
| isCachingAllowed ()
| setIsCachingAllowed ( $allowed)
| appendTemplateFetch ( $actualTemplateName)
| resetErrorLog ()
| templateFetchList ()
| setCompileTest ( $val)
| testCompile ()

## Static Public Member Functions
| resourceData ( $resourceObject, $uri, $resourceName, $templateName)
| mergeNamespace ( $rootNamespace, $additionalNamespace)
static | instance ()
static | factory ()
static | resetInstance ()
static | isXHTMLCodeIncluded ()
static | isMethodDebugEnabled ()
static | isDebugEnabled ()
static | setIsDebugEnabled ( $debug)
static | isTemplatesUsageStatisticsEnabled ()
| setIsTemplatesUsageStatisticsEnabled ( $enabled)
| appendTemplateToStatisticsIfNeeded (&$templateName, &$templateFileName)
| appendTemplateToStatistics ( $templateName, $templateFileName)
static | templatesUsageStatistics ()

## Public Attributes
const | RESOURCE_FETCH = 1
const | RESOURCE_QUERY = 2
const | ELEMENT_TEXT = 1
const | ELEMENT_SINGLE_TAG = 2
const | ELEMENT_NORMAL_TAG = 3
const | ELEMENT_END_TAG = 4
const | ELEMENT_VARIABLE = 5
const | ELEMENT_COMMENT = 6
const | NODE_ROOT = 1
const | NODE_TEXT = 2
const | NODE_VARIABLE = 3
const | NODE_FUNCTION = 4
const | NODE_OPERATOR = 5
const | NODE_INTERNAL = 100
const | NODE_INTERNAL_CODE_PIECE = 101
const | NODE_INTERNAL_VARIABLE_SET = 105
const | NODE_INTERNAL_VARIABLE_UNSET = 102
const | NODE_INTERNAL_NAMESPACE_CHANGE = 103
const | NODE_INTERNAL_NAMESPACE_RESTORE = 104
const | NODE_INTERNAL_WARNING = 120
const | NODE_INTERNAL_ERROR = 121
const | NODE_INTERNAL_RESOURCE_ACQUISITION = 140
const | NODE_OPTIMIZED_RESOURCE_ACQUISITION = 141
const | NODE_INTERNAL_OUTPUT_ASSIGN = 150
const | NODE_INTERNAL_OUTPUT_READ = 151
const | NODE_INTERNAL_OUTPUT_INCREASE = 152
const | NODE_INTERNAL_OUTPUT_DECREASE = 153
const | NODE_INTERNAL_OUTPUT_SPACING_INCREASE = 160
const | NODE_INTERNAL_SPACING_DECREASE = 161
const | NODE_OPTIMIZED_INIT = 201
const | NODE_USER_CUSTOM = 1000
const | TYPE_VOID = 0
const | TYPE_STRING = 1
const | TYPE_NUMERIC = 2
const | TYPE_IDENTIFIER = 3
const | TYPE_VARIABLE = 4
const | TYPE_ATTRIBUTE = 5
const | TYPE_OPERATOR = 6
const | TYPE_BOOLEAN = 7
const | TYPE_ARRAY = 8
const | TYPE_DYNAMIC_ARRAY = 9
const | TYPE_INTERNAL = 100
const | TYPE_INTERNAL_CODE_PIECE = 101
const | TYPE_PHP_VARIABLE = 102
const | TYPE_OPTIMIZED_NODE = 201
const | TYPE_OPTIMIZED_ARRAY_LOOKUP = 202
const | TYPE_OPTIMIZED_CONTENT_CALL = 203
const | TYPE_OPTIMIZED_ATTRIBUTE_LOOKUP = 204
const | TYPE_INTERNAL_STOP = 999
const | TYPE_STRING_BIT = 1
const | TYPE_NUMERIC_BIT = 2
const | TYPE_IDENTIFIER_BIT = 4
const | TYPE_VARIABLE_BIT = 8
const | TYPE_ATTRIBUTE_BIT = 16
const | TYPE_OPERATOR_BIT = 32
const | TYPE_NONE = 0
const | TYPE_ALL = 63
const | TYPE_BASIC = 47
const | TYPE_MODIFIER_MASK = 48
const | NAMESPACE_SCOPE_GLOBAL = 1
const | NAMESPACE_SCOPE_LOCAL = 2
const | NAMESPACE_SCOPE_RELATIVE = 3
const | DEBUG_INTERNALS = false
const | FILE_ERRORS = 1
| $Resources
| $DefaultResource
| Reference to the default resource object. More...
| $Text
| The original template text. More...
| $IncludeText
| Included texts, usually performed by custom functions. More...
| $IncludeOutput
| Included outputs, usually performed by custom functions. More...
| $TimeStamp
| The timestamp of the template when it was last modified. More...
| $LDelim
| The left delimiter used for parsing. More...
| $RDelim
| The right delimiter used for parsing. More...
| $Tree
| The resulting object tree of the template. More...
| $Variables
| An associative array of template variables. More...
| $LocalVariablesNamesStack
| $CurrentLocalVariablesNames
| $Operators
| An associative array of operators. More...
| $Functions
| An associative array of functions. More...
| $FunctionAttributes
| An associative array of function attributes. More...
| $Literals
| An associative array of literal tags. More...
| $ShowDetails = false
| True if output details is to be shown. More...
| $IsCachingAllowed
| `true` if caching is allowed More...
| $ErrorLog
| Array containing all errors occured during a fetch. More...
| $WarningLog
| Array containing all warnings occured during a fetch. More...
| $AutoloadPathList
| $Level = 0
| include level More...
| $MaxLevel = 40
| $TemplatesUsageStatistics
| A list of templates used by a rendered page. More...
| $ForeachCounter
| $ForCounter
| $WhileCounter
| $DoCounter
| $ElseifCounter
| $TestCompile
| $MaxLevelWarning
| $TemplateFetchList

## Static Protected Attributes
static | $instance
static | $factory = false

## Private Member Functions
| registerFunctionsInternal ( $functionObject, $debug=false)

## Detailed Description

The main manager for templates.

The template systems allows for separation of code and layout by moving the layout part into template files. These template files are parsed and processed with template variables set by the PHP code.

The template system in itself is does not do much, it parses template files according to a rule set sets up a tree hierarchy and process the data using functions and operators. The standard template system comes with only a few functions and no operators, it is meant for these functions and operators to be specified by the users of the template system. But for simplicity a few help classes is available which can be easily enabled.

The classes are:

- eZTemplateDelimitFunction - Inserts the left and right delimiter which are normally parsed.
- eZTemplateSectionFunction - Allows for conditional blocks and loops.
- eZTemplateIncludeFunction - Includes external templates
- eZTemplateSequenceFunction - Creates sequences arrays
- eZTemplateSwitchFunction - Conditional output of template
- eZTemplatePHPOperator - Allows for easy redirection of operator names to PHP functions.
- eZTemplateLocaleOperator - Allows for locale conversions.
- eZTemplateArrayOperator - Creates arrays
- eZTemplateAttributeOperator - Displays contents of template variables, useful for debugging
- eZTemplateImageOperator - Converts text to image
- eZTemplateLogicOperator - Various logical operators for boolean handling
- eZTemplateUnitOperator - Unit conversion and display

To enable these functions and operator use registerFunction and registerOperator.

In keeping with the spirit of being simple the template system does not know how to get the template files itself. Instead it relies on resource handlers, these handlers fetches the template files using different kind of transport mechanism. For simplicity a default resource class is available, eZTemplateFileResource fetches templates from the filesystem.

The parser process consists of three passes, each pass adds a new level of complexity. The first pass strips text from template blocks which starts with a left delimiter and ends with a right delimiter (default is { and } ), and places them in an array. The second pass iterates the text and block elements and removes newlines from text before function blocks and text after function blocks. The third pass builds the tree according the function rules.

Processing is done by iterating over the root of the tree, if a text block is found the text is appended to the result text. If a variable or contant is it's data is extracted and any operators found are run on it before fetching the result and appending it to the result text. If a function is found the function is called with the parameters and it's up to the function handle children if any.

Constants and template variables will usually be called variables since there's little difference. A template variable expression will start with a $ and consists of a namespace (optional) a name and attribues(optional). The variable expression

    $root:var.attr1

exists in the "root" namespace, has the name "var" and uses the attribute "attr1". Some functions will create variables on demand, to avoid name conflicts namespaces were introduced, each function will place the new variables in a namespace specified in the template file. Attribues are used for fetching parts of the variable, for instance an element in an array or data in an object. Since the syntax is the same for arrays and objects the PHP code can use simple arrays when speed is required, the template code will not care. A different syntax is also available when you want to access an attribute using a variable. For instance

    $root:var[$attr_var]

, if the variable $attr_var contains "attr1" it would access the same attribute as in the first example.

The syntax for operators is a | and a name, optionally parameters can be specified with ( and ) delimited with ,. Valid operators are

    |upcase, |l10n(date)

.

Functions look a lot like HTML/XML tags. The function consists of a name and parameters which are assigned using the param=value syntax. Some parameters may be required while others may be optionally, the exact behaviour is specified by each function. Valid functions are

    "section name=abc loop=4"

Example of usage:

// Init template
$tpl = eZTemplate::instance();
$tpl->registerOperators( new eZTemplatePHPOperator( array( "upcase" => "strtoupper",
"reverse" => "strrev" ) ) );
$tpl->registerOperators( new eZTemplateLocaleOperator() );
$tpl->registerFunction( "section", new eZTemplateSectionFunction( "section" ) );
$tpl->registerFunctions( new eZTemplateDelimitFunction() );
$tpl->setVariable( "my_var", "{this value set by variable}", "test" );
$tpl->setVariable( "my_arr", array( "1st", "2nd", "third", "fjerde" ) );
$tpl->setVariable( "multidim", array( array( "a", "b" ),
array( "c", "d" ),
array( "e", "f" ),
array( "g", "h" ) ) );
class mytest
{
function mytest( $n, $s )
{
$this->n = $n;
$this->s = $s;
}
function hasAttribute( $attr )
{
return ( $attr == "name" || $attr == "size" );
}
function attribute( $attr )
{
switch ( $attr )
{
case "name";
return $this->n;
case "size";
return $this->s;
default:
$retAttr = null;
return $retAttr;
}
}
}
$tpl->setVariable( "multidim_obj", array( new mytest( "jan", 200 ),
new mytest( "feb", 200 ),
new mytest( "john", 200 ),
new mytest( "doe", 50 ) ) );
$tpl->setVariable( "curdate", time() );
$tpl->display( "lib/eztemplate/example/test.tpl" );
// test.tpl
{section name=outer loop=4}
123
{delimit}::{/delimit}
{/section}
{literal test=1} This is some {blah arg1="" arg2="abc" /} {/literal}
<title>This is a test</title>
<table border="1">
<tr><th>{$test:my_var}
{"some text!!!"|upcase|reverse}</th></tr>
{section name=abc loop=$my_arr}
<tr><td>{$abc:item}</td></tr>
{/section}
</table>
<table border="1">
{section name=outer loop=$multidim}
<tr>
{section name=inner loop=$outer:item}
<td>{$inner:item}</td>
{/section}
</tr>
{/section}
</table>
<table border="1">
{section name=outer loop=$multidim_obj}
<tr>
<td>{$outer:item.name}</td>
<td>{$outer:item.size}</td>
</tr>
{/section}
</table>
{section name=outer loop=$nonexistingvar}
<b><i>Dette skal ikke vises</b></i>
{section-else}
<b><i>This is shown when the {ldelim}$loop{rdelim} variable is non-existant</b></i>
{/section}
Denne koster {1.4|l10n(currency)}<br>
{-123456789|l10n(number)}<br>
{$curdate|l10n(date)}<br>
{$curdate|l10n(shortdate)}<br>
{$curdate|l10n(time)}<br>
{$curdate|l10n(shorttime)}<br>
{include file="test2.tpl"/}
eZTemplateDelimitFunction
Displays left and right delimiter in templates.
Definition: eztemplatedelimitfunction.php:37
eZTemplateLocaleOperator
Locale aware conversions and output using operator "l10n".
Definition: eztemplatelocaleoperator.php:30
eZTemplatePHPOperator
Makes it easy to add php functions as operators.
Definition: eztemplatephpoperator.php:30
eZTemplateSectionFunction
Advanced block handling in templates using function "section".
Definition: eztemplatesectionfunction.php:58
eZTemplate\variable
variable( $var, $namespace='', $attrs=null)
Definition: eztemplate.php:1593
eZTemplate\instance
static instance()
Definition: eztemplate.php:2361

Definition at line 198 of file eztemplate.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZTemplate::__construct | ( |  | ) |

Intializes the template with left and right delimiters being { and }, and a file resource. The literal tag "literal" is also registered.

Definition at line 296 of file eztemplate.php.

References eZDebug\createAccumulatorGroup(), NODE_ROOT, registerLiteral(), registerResource(), resetErrorLog(), and ezpI18n\tr().

## Member Function Documentation

## ◆ appendDebugNodes()

eZTemplate::appendDebugNodes | ( | & | $root,
|  | & | $resourceData
| ) |  |

Creates some text nodes before and after the children of $root. It will extract the current filename and uri and create some XHTML comments and inline text.

See also
  isXHTMLCodeIncluded

Definition at line 1738 of file eztemplate.php.

References eZTemplateNodeTool\createTextNode(), and isXHTMLCodeIncluded().

Referenced by compileTemplateFile(), loadURIRoot(), and validateTemplateFile().

## ◆ appendElement()

eZTemplate::appendElement | ( | & | $text,
|  |  | $item,
|  |  | $nspace,
|  |  | $name
| ) |  |

Definition at line 1686 of file eztemplate.php.

References appendElementText().

## ◆ appendElementText()

eZTemplate::appendElementText | ( | & | $textElements,
|  |  | $item,
|  |  | $nspace,
|  |  | $name
| ) |  |

Definition at line 1692 of file eztemplate.php.

References eZTemplateIncludeFunction\handleInclude(), and setVariable().

Referenced by appendElement(), and processVariable().

## ◆ appendTemplateFetch()

eZTemplate::appendTemplateFetch | ( |  | $actualTemplateName | ) |

Appends template info for current fetch.

Definition at line 2582 of file eztemplate.php.

Referenced by loadURIRoot().

## ◆ appendTemplateToStatistics()

eZTemplate::appendTemplateToStatistics | ( |  | $templateName,
|  |  | $templateFileName
| ) |  |
| static

Appends template info to stats.

Definition at line 2548 of file eztemplate.php.

References instance().

Referenced by appendTemplateToStatisticsIfNeeded().

## ◆ appendTemplateToStatisticsIfNeeded()

eZTemplate::appendTemplateToStatisticsIfNeeded | ( | & | $templateName,
|  | & | $templateFileName
| ) |  |
| static

Checks settings and if 'ShowUsedTemplates' is enabled appends template info to stats.

Definition at line 2538 of file eztemplate.php.

References appendTemplateToStatistics(), and isTemplatesUsageStatisticsEnabled().

Referenced by loadURIRoot().

## ◆ attributeValue()

eZTemplate::attributeValue | ( | & | $data,
|  |  | $nspace
| ) |  |

Return the identifier used for attribute lookup.

Definition at line 1366 of file eztemplate.php.

References elementValue(), and error().

## ◆ autoload()

eZTemplate::autoload | ( |  | ) |

Looks trough the pathes specified in autoloadPathList() and fetches autoload definition files used for autoloading functions and operators.

Definition at line 2217 of file eztemplate.php.

References $eZTemplateFunctionArray, $eZTemplateOperatorArray, autoloadPathList(), registerAutoloadFunctions(), registerAutoloadOperators(), and eZDebug\writeWarning().

## ◆ autoloadPathList()

eZTemplate::autoloadPathList | ( |  | ) |

Returns
  the path list which is used for autoloading functions and operators.

Definition at line 2200 of file eztemplate.php.

References $AutoloadPathList.

Referenced by autoload().

## ◆ canCompileTemplate()

eZTemplate::canCompileTemplate | ( |  | $resourceData,
|  | & | $extraParameters
| ) |  |

Definition at line 853 of file eztemplate.php.

Referenced by loadURIRoot().

## ◆ compileTemplate()

eZTemplate::compileTemplate | ( | & | $resourceData,
|  | & | $extraParameters
| ) |  |

Definition at line 962 of file eztemplate.php.

Referenced by loadURIRoot().

## ◆ compileTemplateFile()

eZTemplate::compileTemplateFile | ( |  | $file,
|  |  | $returnResourceData = `false`
| ) |  |

Compiles the template file $file and returns `true` if the compilation was OK.

Parameters

  $returnResourceData | If `true` then the returned value will be the resourcedata structure

See also
  validateTemplateFile(), fetch()

Definition at line 916 of file eztemplate.php.

References appendDebugNodes(), eZTemplateCompiler\compileTemplate(), isDebugEnabled(), NODE_ROOT, parse(), resetErrorLog(), RESOURCE_FETCH, resourceData(), and resourceFor().

## ◆ createLocalVariablesList()

eZTemplate::createLocalVariablesList | ( |  | ) |

Initialize list of local variables for the current template. The list contains only names of variables.

Definition at line 428 of file eztemplate.php.

Referenced by process().

## ◆ destroyLocalVariablesList()

eZTemplate::destroyLocalVariablesList | ( |  | ) |

Destroy list of local variables defined in the current (innermost) template.

Definition at line 479 of file eztemplate.php.

Referenced by process().

## ◆ display()

eZTemplate::display | ( |  | $template = `false`,
|  |  | $extraParameters = `false`
| ) |  |

Fetches the result of the template file and displays it. If $template is supplied it will load this template file first.

Definition at line 384 of file eztemplate.php.

References fetch(), and reset().

## ◆ doFunction()

eZTemplate::doFunction | ( |  | $name,
|  |  | $func_obj,
|  |  | $nspace,
|  |  | $current_nspace
| ) |  |

Tries to run the function object $func_obj

Definition at line 1458 of file eztemplate.php.

References loadAndRegisterFunctions(), and warning().

## ◆ doOperator()

eZTemplate::doOperator | ( |  | $element,
|  | & | $namespace,
|  | & | $current_nspace,
|  | & | $value,
|  |  | $operatorName,
|  |  | $operatorParameters,
|  | & | $named_params
| ) |  |

Tries to run the operator $operatorName with parameters $operatorParameters on the value $value.

Definition at line 1440 of file eztemplate.php.

References loadAndRegisterOperators(), and warning().

## ◆ elementValue()

eZTemplate::elementValue | ( | & | $dataElements,
|  |  | $rootNamespace,
|  |  | $currentNamespace,
|  |  | $placement = `false`,
|  |  | $checkExistance = `false`,
|  |  | $checkForProxy = `false`
| ) |  |

Returns the actual value of a template type or null if an unknown type.

Definition at line 1065 of file eztemplate.php.

References error(), expandAttributes(), hasVariable(), mergeNamespace(), NAMESPACE_SCOPE_GLOBAL, NAMESPACE_SCOPE_LOCAL, NAMESPACE_SCOPE_RELATIVE, processOperator(), TYPE_ARRAY, TYPE_ATTRIBUTE, TYPE_BOOLEAN, TYPE_IDENTIFIER, TYPE_NUMERIC, TYPE_OPERATOR, TYPE_STRING, TYPE_VARIABLE, TYPE_VOID, variable(), and warning().

Referenced by attributeValue(), processOperator(), and processVariable().

## ◆ emptyVariable()

eZTemplate::emptyVariable | ( |  | ) |

Returns the empty variable type.

Definition at line 1044 of file eztemplate.php.

## ◆ error()

eZTemplate::error | ( |  | $name,
|  |  | $txt,
|  |  | $placement = `false`
| ) |  |

Displays an error for the function/operator $name and text $txt.

Definition at line 2143 of file eztemplate.php.

References FILE_ERRORS, ini(), placementText(), ezpI18n\tr(), and eZDebug\writeError().

Referenced by attributeValue(), elementValue(), processOperator(), registerAutoloadFunctions(), registerAutoloadOperators(), and undefinedFunction().

## ◆ errorCount()

eZTemplate::errorCount | ( |  | ) |

Returns
  The number of errors that occured with the last fetch

See also
  hasErrors()

Definition at line 2306 of file eztemplate.php.

Referenced by hasErrors().

## ◆ errorLog()

eZTemplate::errorLog | ( |  | ) |

Returns
  error log.

See also
  errorCount()

Definition at line 2324 of file eztemplate.php.

References $ErrorLog.

## ◆ executeCompiledTemplate()

eZTemplate::executeCompiledTemplate | ( | & | $resourceData,
|  | & | $textElements,
|  |  | $rootNamespace,
|  |  | $currentNamespace,
|  | & | $extraParameters
| ) |  |

Definition at line 974 of file eztemplate.php.

Referenced by fetch(), and processURI().

## ◆ expandAttributes()

eZTemplate::expandAttributes | ( |  | $attributeList,
|  |  | $chooseText,
|  |  | $maxThreshold,
|  |  | $minThreshold = `1`
| ) |  |

Definition at line 1270 of file eztemplate.php.

Referenced by elementValue().

## ◆ extraParameters()

eZTemplate::extraParameters | ( |  | $name,
|  |  | $count,
|  |  | $maxCount
| ) |  |

Outputs a warning about the parameter count being to high for function/operator $name.

Definition at line 2070 of file eztemplate.php.

References warning().

## ◆ factory()

static eZTemplate::factory | ( |  | ) |
| static

Returns a shared instance of the eZTemplate class with default settings applied, like:

- Autoload operators loaded
- Debug mode set
- eZTemplateDesignResource::instance registered

Since
  4.3

Returns
  eZTemplate

Definition at line 2380 of file eztemplate.php.

References $instance, eZExtension\expandedPathList(), eZTemplateDesignResource\instance(), instance(), and setIsDebugEnabled().

Referenced by eZContentCacheManager\generateObjectViewCache(), eZGeneralDigestHandler\handle(), eZCollaborationItemHandler\handleCollaborationEvent(), eZSubTreeHandler\handlePublishEvent(), eZXMLOutputHandler\outputText(), eZTrigger\runWorkflow(), eZDefaultConfirmOrderHandler\sendOrderEmail(), eZContentObjectTreeNodeOperations\showNotificationAfterCopying(), and templateInit().

## ◆ fetch()

eZTemplate::fetch | ( |  | $template = `false`,
|  |  | $extraParameters = `false`,
|  |  | $returnResourceData = `false`
| ) |  |

Tries to fetch the result of the template file and returns it. If $template is supplied it will load this template file first.

Definition at line 493 of file eztemplate.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZDebug\addTimingPoint(), executeCompiledTemplate(), isDebugEnabled(), loadURIRoot(), process(), resetErrorLog(), and eZDebug\writeDebug().

Referenced by display(), and eZNodeviewfunctions\generateNodeViewData().

## ◆ fetchFunctionObject()

eZTemplate::fetchFunctionObject | ( |  | $functionName | ) |

Definition at line 658 of file eztemplate.php.

References loadAndRegisterFunctions().

## ◆ hasChildren()

eZTemplate::hasChildren | ( | & | $function,
|  |  | $functionName
| ) |  |

Definition at line 1032 of file eztemplate.php.

## ◆ hasErrors()

eZTemplate::hasErrors | ( |  | ) |

Returns
  \ true if errors occured with the last fetch.

See also
  errorCount()

Definition at line 2315 of file eztemplate.php.

References errorCount().

Referenced by validateTemplateFile().

## ◆ hasLocalVariable()

eZTemplate::hasLocalVariable | ( |  | $varName,
|  |  | $rootNamespace
| ) |  |

Check if the given local variable exists.

Definition at line 437 of file eztemplate.php.

Referenced by unsetLocalVariable().

## ◆ hasVariable()

eZTemplate::hasVariable | ( |  | $var,
|  |  | $namespace = `''`,
|  |  | $attrs = `null`
| ) |  |

Returns true if the variable $var is set in namespace $namespace, if $attrs is supplied all attributes must exist for the function to return true.

Parameters

  string | $var |
  string | $namespace | (optional)
  array | $attrs | (optional) Deprecated as of 4.4.

Returns
  bool

Definition at line 1548 of file eztemplate.php.

References eZDebug\writeStrict().

Referenced by elementValue(), and eZNodeviewfunctions\generateNodeViewData().

## ◆ hasWarnings()

eZTemplate::hasWarnings | ( |  | ) |

Returns
  \ true if warnings occured with the last fetch.

See also
  warningCount()

Definition at line 2342 of file eztemplate.php.

References warningCount().

Referenced by validateTemplateFile().

## ◆ ini()

eZTemplate::ini | ( |  | ) |

Returns the eZINI object instance for the template.ini file.

Returns
  eZINI

Definition at line 2426 of file eztemplate.php.

Referenced by error().

## ◆ instance()

static eZTemplate::instance | ( |  | ) |
| static

Returns a shared instance of the eZTemplate class.

Returns
  eZTemplate

Definition at line 2361 of file eztemplate.php.

References $instance.

Referenced by appendTemplateToStatistics(), factory(), and templatesUsageStatistics().

## ◆ isCachingAllowed()

eZTemplate::isCachingAllowed | ( |  | ) |

Returns
  `true` if caching is allowed (default) or `false` otherwise. This also affects template compiling.

See also
  setIsCachingAllowed

Definition at line 2488 of file eztemplate.php.

References $IsCachingAllowed.

Referenced by loadURIRoot().

## ◆ isDebugEnabled()

static eZTemplate::isDebugEnabled | ( |  | ) |
| static

Returns
  true if debugging of internals is enabled, this will display which files are loaded and when cache files are created. Set the option with setIsDebugEnabled().

Definition at line 2467 of file eztemplate.php.

References DEBUG_INTERNALS.

Referenced by compileTemplateFile(), fetch(), eZTemplateFileResource\handleResourceData(), loadURIRoot(), processURI(), resourceFor(), and validateTemplateFile().

## ◆ isMethodDebugEnabled()

static eZTemplate::isMethodDebugEnabled | ( |  | ) |
| static

Returns
  `true` if debug output of template functions and operators should be enabled.

Definition at line 2451 of file eztemplate.php.

Referenced by processFunction(), and processOperator().

## ◆ isTemplatesUsageStatisticsEnabled()

static eZTemplate::isTemplatesUsageStatisticsEnabled | ( |  | ) |
| static

Returns
  `true` if templates usage statistics should be enabled.

Definition at line 2509 of file eztemplate.php.

Referenced by appendTemplateToStatisticsIfNeeded(), and eZTemplatesStatisticsReporter\generateStatistics().

## ◆ isXHTMLCodeIncluded()

static eZTemplate::isXHTMLCodeIncluded | ( |  | ) |
| static

Returns
  true if special XHTML code should be included before the included template file. This code will display the template filename in the browser but will eventually break the design.

Definition at line 2437 of file eztemplate.php.

Referenced by appendDebugNodes().

## ◆ leftDelimiter()

eZTemplate::leftDelimiter | ( |  | ) |

Returns the left delimiter being used.

Definition at line 351 of file eztemplate.php.

References $LDelim.

## ◆ load()

eZTemplate::load | ( |  | $uri,
|  |  | $extraParameters = `false`,
|  |  | $returnResourceData = `false`
| ) |  |

Loads the template using the URI $uri and parses it.

Returns
  The root node of the tree if $returnResourceData is false, if `true` the entire resource data structure.

Definition at line 674 of file eztemplate.php.

References loadURIRoot().

## ◆ loadAndRegisterFunctions()

eZTemplate::loadAndRegisterFunctions | ( |  | $functionDefinition | ) |

Definition at line 1815 of file eztemplate.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and registerFunctionsInternal().

Referenced by doFunction(), fetchFunctionObject(), and processFunction().

## ◆ loadAndRegisterOperators()

eZTemplate::loadAndRegisterOperators | ( |  | $operatorDefinition | ) |

Definition at line 1934 of file eztemplate.php.

References registerOperatorsInternal().

Referenced by doOperator(), operatorParameterList(), and processOperator().

## ◆ loadURIData()

eZTemplate::loadURIData | ( |  | $resourceObject,
|  |  | $uri,
|  |  | $resourceName,
|  |  | $template,
|  | & | $extraParameters,
|  |  | $displayErrors = `true`
| ) |  |

Definition at line 693 of file eztemplate.php.

References RESOURCE_FETCH, resourceData(), and warning().

Referenced by loadURIRoot().

## ◆ loadURIRoot()

eZTemplate::loadURIRoot | ( |  | $uri,
|  |  | $displayErrors,
|  | & | $extraParameters
| ) |  |

Loads the template using the URI $uri and returns a structure with the text and timestamp, false otherwise. The structure keys are:

- "text", the text.
- "time-stamp", the timestamp.

Definition at line 740 of file eztemplate.php.

References appendDebugNodes(), appendTemplateFetch(), appendTemplateToStatisticsIfNeeded(), canCompileTemplate(), compileTemplate(), isCachingAllowed(), isDebugEnabled(), loadURIData(), NODE_ROOT, parse(), resourceFor(), setIncludeText(), and warning().

Referenced by fetch(), load(), and processURI().

## ◆ mergeNamespace()

eZTemplate::mergeNamespace | ( |  | $rootNamespace,
|  |  | $additionalNamespace
| ) |  |
| static

Definition at line 1052 of file eztemplate.php.

Referenced by elementValue().

## ◆ missingParameter()

eZTemplate::missingParameter | ( |  | $name,
|  |  | $param
| ) |  |

Outputs a warning about the parameter $param missing for function/operator $name.

Definition at line 2062 of file eztemplate.php.

References warning().

## ◆ operatorInputSupported()

eZTemplate::operatorInputSupported | ( |  | $operatorName | ) |

Definition at line 2177 of file eztemplate.php.

## ◆ operatorParameterList()

eZTemplate::operatorParameterList | ( |  | $name | ) |

Returns the named parameter list for the operator $name.

Definition at line 1407 of file eztemplate.php.

References loadAndRegisterOperators().

Referenced by processOperator().

## ◆ parse()

eZTemplate::parse | ( |  | $sourceText,
|  | & | $rootElement,
|  |  | $rootNamespace,
|  | & | $resourceData
| ) |  |

Definition at line 687 of file eztemplate.php.

References eZTemplateMultiPassParser\instance().

Referenced by compileTemplateFile(), loadURIRoot(), and validateTemplateFile().

## ◆ placementText()

eZTemplate::placementText | ( |  | $placement = `false` | ) |

Creates a string for the placement information and returns it.

Note
  The placement information can either be in indexed or associative

Definition at line 2095 of file eztemplate.php.

Referenced by error(), and warning().

## ◆ process()

eZTemplate::process | ( |  | $root,
|  | & | $text,
|  |  | $rootNamespace,
|  |  | $currentNamespace
| ) |  |

Definition at line 567 of file eztemplate.php.

References createLocalVariablesList(), destroyLocalVariablesList(), processNode(), and unsetLocalVariables().

Referenced by fetch(), and processURI().

## ◆ processFunction()

eZTemplate::processFunction | ( |  | $functionName,
|  | & | $textElements,
|  |  | $functionChildren,
|  |  | $functionParameters,
|  |  | $functionPlacement,
|  |  | $rootNamespace,
|  |  | $currentNamespace
| ) |  |

Definition at line 631 of file eztemplate.php.

References isMethodDebugEnabled(), loadAndRegisterFunctions(), warning(), and eZDebug\writeDebug().

Referenced by processNode().

## ◆ processNode()

eZTemplate::processNode | ( |  | $node,
|  | & | $textElements,
|  |  | $rootNamespace,
|  |  | $currentNamespace
| ) |  |

Definition at line 582 of file eztemplate.php.

References NODE_FUNCTION, NODE_ROOT, NODE_TEXT, NODE_VARIABLE, processFunction(), processVariable(), and eZDebug\writeError().

Referenced by process().

## ◆ processOperator()

eZTemplate::processOperator | ( |  | $operatorName,
|  |  | $operatorParameters,
|  |  | $rootNamespace,
|  |  | $currentNamespace,
|  | & | $valueData,
|  |  | $placement = `false`,
|  |  | $checkExistance = `false`
| ) |  |

Definition at line 1302 of file eztemplate.php.

References elementValue(), error(), isMethodDebugEnabled(), loadAndRegisterOperators(), operatorParameterList(), TYPE_VOID, warning(), and eZDebug\writeDebug().

Referenced by elementValue().

## ◆ processURI()

eZTemplate::processURI | ( |  | $uri,
|  |  | $displayErrors,
|  | & | $extraParameters,
|  | & | $textElements,
|  |  | $rootNamespace,
|  |  | $currentNamespace
| ) |  |

Definition at line 797 of file eztemplate.php.

References $MaxLevelWarning, executeCompiledTemplate(), isDebugEnabled(), loadURIRoot(), process(), setIncludeOutput(), eZDebug\writeDebug(), and eZDebug\writeError().

## ◆ processVariable()

eZTemplate::processVariable | ( | & | $textElements,
|  |  | $variableData,
|  |  | $variablePlacement,
|  |  | $rootNamespace,
|  |  | $currentNamespace
| ) |  |

Definition at line 625 of file eztemplate.php.

References appendElementText(), and elementValue().

Referenced by processNode().

## ◆ registerAutoloadFunctions()

eZTemplate::registerAutoloadFunctions | ( |  | $functionDefinition | ) |

Definition at line 1780 of file eztemplate.php.

References error().

Referenced by autoload().

## ◆ registerAutoloadOperators()

eZTemplate::registerAutoloadOperators | ( |  | $operatorDefinition | ) |

Definition at line 1906 of file eztemplate.php.

References error().

Referenced by autoload().

## ◆ registerFilter()

eZTemplate::registerFilter | ( |  | ) |

Not implemented yet.

Definition at line 2015 of file eztemplate.php.

## ◆ registerFunction()

eZTemplate::registerFunction | ( |  | $func_name,
|  |  | $func_obj
| ) |  |

Registers the function $func_name to be bound to object $func_obj. If the object has a function called attributeList() it is used for registering function attributes. The function returns an associative array with each key being the name of the function and the value being a boolean. If the boolean is true the function will have children.

Definition at line 1876 of file eztemplate.php.

## ◆ registerFunctions()

eZTemplate::registerFunctions | ( | & | $functionObject | ) |

Registers the functions supplied by the object $functionObject. The object must have a function called functionList() which returns an array of functions this object handles. If the object has a function called attributeList() it is used for registering function attributes. The function returns an associative array with each key being the name of the function and the value being a boolean. If the boolean is true the function will have children.

Definition at line 1775 of file eztemplate.php.

References registerFunctionsInternal().

## ◆ registerFunctionsInternal()

eZTemplate::registerFunctionsInternal | ( |  | $functionObject,
|  |  | $debug = `false`
| ) |  |
| private

Definition at line 1848 of file eztemplate.php.

Referenced by loadAndRegisterFunctions(), and registerFunctions().

## ◆ registerLiteral()

eZTemplate::registerLiteral | ( |  | $func_name | ) |

Registers a new literal tag in which the tag will be transformed into a text element.

Definition at line 1893 of file eztemplate.php.

Referenced by __construct().

## ◆ registerOperator()

eZTemplate::registerOperator | ( |  | $op_name,
|  |  | $op_obj
| ) |  |

Registers the operator $op_name to use the object $op_obj.

Definition at line 1989 of file eztemplate.php.

## ◆ registerOperators()

eZTemplate::registerOperators | ( | & | $operatorObject | ) |

Registers the operators supplied by the object $operatorObject. The function operatorList() must return an array of operator names.

Definition at line 1970 of file eztemplate.php.

References registerOperatorsInternal().

## ◆ registerOperatorsInternal()

eZTemplate::registerOperatorsInternal | ( |  | $operatorObject,
|  |  | $debug = `false`
| ) |  |

Definition at line 1975 of file eztemplate.php.

Referenced by loadAndRegisterOperators(), and registerOperators().

## ◆ registerResource()

eZTemplate::registerResource | ( |  | $res | ) |

Registers a new resource object $res. The resource object take care of fetching templates using an URI.

Definition at line 2023 of file eztemplate.php.

References warning().

Referenced by __construct().

## ◆ reset()

eZTemplate::reset | ( |  | ) |

Resets all template variables, functions, operators and error counts.

Definition at line 2290 of file eztemplate.php.

References resetElements(), resetErrorLog(), and resetVariables().

Referenced by display().

## ◆ resetElements()

eZTemplate::resetElements | ( |  | ) |

Resets all template functions and operators by calling the resetFunction and resetOperator on all elements that supports it.

Definition at line 2266 of file eztemplate.php.

Referenced by reset().

## ◆ resetErrorLog()

eZTemplate::resetErrorLog | ( |  | ) |

Reset error and warning logs

Definition at line 2591 of file eztemplate.php.

Referenced by __construct(), compileTemplateFile(), fetch(), reset(), and validateTemplateFile().

## ◆ resetInstance()

static eZTemplate::resetInstance | ( |  | ) |
| static

Reset shared instance of the eZTemplate class and factory flag as used by eZTemplate::instance() and eZTemplate::factory()

Since
  4.3

Definition at line 2415 of file eztemplate.php.

## ◆ resetVariables()

eZTemplate::resetVariables | ( |  | ) |

Resets all template variables.

Definition at line 2257 of file eztemplate.php.

Referenced by reset().

## ◆ resourceData()

eZTemplate::resourceData | ( |  | $resourceObject,
|  |  | $uri,
|  |  | $resourceName,
|  |  | $templateName
| ) |  |
| static

Creates a resource data structure of the parameters and returns it. This structure is passed to various parts of the template system.

Note
  If you only have the URI you should call resourceFor() first to figure out the resource handler.

Definition at line 721 of file eztemplate.php.

References $TestCompile.

Referenced by compileTemplateFile(), loadURIData(), and validateTemplateFile().

## ◆ resourceFor()

eZTemplate::resourceFor | ( |  | $uri,
|  | & | $res,
|  | & | $template
| ) |  |

Returns the resource object for URI $uri. If a resource type is specified in the URI it is extracted and set in $res. The template name is set in $template without any resource specifier. To specify a resource the name and a ":" is prepended to the URI, for instance file:my.tpl. If no resource type is found the URI the default resource handler is used.

Definition at line 997 of file eztemplate.php.

References $DefaultResource, isDebugEnabled(), and eZDebug\writeNotice().

Referenced by compileTemplateFile(), loadURIRoot(), and validateTemplateFile().

## ◆ resourceHandler()

eZTemplate::resourceHandler | ( |  | $resourceName | ) |

Returns
  The resource handler object for resource name $resourceName.

See also
  resourceFor

Definition at line 1022 of file eztemplate.php.

References $DefaultResource.

## ◆ rightDelimiter()

eZTemplate::rightDelimiter | ( |  | ) |

Returns the right delimiter being used.

Definition at line 359 of file eztemplate.php.

References $RDelim.

## ◆ setAutoloadPathList()

eZTemplate::setAutoloadPathList | ( |  | $pathList | ) |

Sets the path list for autoloading.

Definition at line 2208 of file eztemplate.php.

## ◆ setCompileTest()

eZTemplate::setCompileTest | ( |  | $val | ) |

Set template compilation test mode.

Parameters

  true,will | set template compilation in test mode ( no disc writes ). false, will compile templates to disc

Definition at line 2621 of file eztemplate.php.

## ◆ setIncludeOutput()

eZTemplate::setIncludeOutput | ( |  | $uri,
|  |  | $output
| ) |  |

Sets the output for uri $uri to $output.

Definition at line 2192 of file eztemplate.php.

Referenced by processURI().

## ◆ setIncludeText()

eZTemplate::setIncludeText | ( |  | $uri,
|  |  | $text
| ) |  |

Sets the original text for uri $uri to $text.

Definition at line 2184 of file eztemplate.php.

Referenced by loadURIRoot().

## ◆ setIsCachingAllowed()

eZTemplate::setIsCachingAllowed | ( |  | $allowed | ) |

Sets whether caching/compiling is allowed or not. This is useful if you need to make sure templates are parsed and processed without any caching mechanisms.

Note
  The default is to allow caching.

See also
  isCachingAllowed

Definition at line 2500 of file eztemplate.php.

## ◆ setIsDebugEnabled()

static eZTemplate::setIsDebugEnabled | ( |  | $debug | ) |
| static

Sets whether internal debugging is enabled or not.

Definition at line 2478 of file eztemplate.php.

Referenced by factory().

## ◆ setIsTemplatesUsageStatisticsEnabled()

eZTemplate::setIsTemplatesUsageStatisticsEnabled | ( |  | $enabled | ) |
| static

Sets whether templates usage statistics enabled or not.

Returns
  `true` if templates usage statistics was enabled, otherwise `false`.

Definition at line 2524 of file eztemplate.php.

## ◆ setLeftDelimiter()

eZTemplate::setLeftDelimiter | ( |  | $delim | ) |

Sets the left delimiter.

Definition at line 367 of file eztemplate.php.

## ◆ setLocalVariable()

eZTemplate::setLocalVariable | ( |  | $varName,
|  |  | $varValue,
|  |  | $rootNamespace
| ) |  |

Create a local variable.

Definition at line 446 of file eztemplate.php.

References setVariable().

## ◆ setRightDelimiter()

eZTemplate::setRightDelimiter | ( |  | $delim | ) |

Sets the right delimiter.

Definition at line 375 of file eztemplate.php.

## ◆ setShowDetails()

eZTemplate::setShowDetails | ( |  | $show | ) |

Sets whether detail output is used or not. Detail output is useful for debug output where you want to examine the template and the output text.

Definition at line 2054 of file eztemplate.php.

## ◆ setVariable()

eZTemplate::setVariable | ( |  | $var,
|  |  | $val,
|  |  | $namespace = `''`,
|  |  | $scopeSafe = `false`
| ) |  |

Sets the template variable $var to the value $val.

Parameters

  string | $var |
  string | $val |
  string | $namespace | (optional)
  bool | $scopeSafe | If true, will assure that $var is not overridden for $namespace. False by default

Definition at line 1486 of file eztemplate.php.

Referenced by appendElementText(), eZNodeviewfunctions\generateNodeViewData(), and setLocalVariable().

## ◆ templateFetchList()

eZTemplate::templateFetchList | ( |  | ) |

Returns template list for the last fetch.

Definition at line 2610 of file eztemplate.php.

References $TemplateFetchList.

Referenced by eZNodeviewfunctions\generateNodeViewData().

## ◆ templatesUsageStatistics()

static eZTemplate::templatesUsageStatistics | ( |  | ) |
| static

Returns template usage statistics

Definition at line 2601 of file eztemplate.php.

References instance().

Referenced by eZTemplatesStatisticsReporter\generateStatistics().

## ◆ testCompile()

eZTemplate::testCompile | ( |  | ) |

Get if template session is test compile

Definition at line 2629 of file eztemplate.php.

References $TestCompile.

## ◆ undefinedFunction()

eZTemplate::undefinedFunction | ( |  | $func_name | ) |

Outputs an error about the template function $func_name being undefined.

Definition at line 2086 of file eztemplate.php.

References error().

## ◆ undefinedVariable()

eZTemplate::undefinedVariable | ( |  | $name,
|  |  | $var
| ) |  |

Outputs a warning about the variable $var being undefined.

Definition at line 2078 of file eztemplate.php.

References warning().

## ◆ unregisterLiteral()

eZTemplate::unregisterLiteral | ( |  | $func_name | ) |

Removes the literal tag $func_name.

Definition at line 1901 of file eztemplate.php.

## ◆ unregisterOperator()

eZTemplate::unregisterOperator | ( |  | $op_name | ) |

Unregisters the operator $op_name.

Definition at line 1997 of file eztemplate.php.

References warning().

## ◆ unregisterResource()

eZTemplate::unregisterResource | ( |  | $res_name | ) |

Unregisters the resource $res_name.

Definition at line 2034 of file eztemplate.php.

References warning().

## ◆ unsetLocalVariable()

eZTemplate::unsetLocalVariable | ( |  | $varName,
|  |  | $rootNamespace
| ) |  |

Destroy a local variable.

Definition at line 455 of file eztemplate.php.

References hasLocalVariable(), and unsetVariable().

Referenced by unsetLocalVariables().

## ◆ unsetLocalVariables()

eZTemplate::unsetLocalVariables | ( |  | ) |

Destroy all local variables defined in the current template.

Definition at line 467 of file eztemplate.php.

References unsetLocalVariable().

Referenced by process().

## ◆ unsetVariable()

eZTemplate::unsetVariable | ( |  | $var,
|  |  | $namespace = `''`
| ) |  |

Unsets the template variable $var.

Parameters

  string | $var |
  string | $namespace | (optional)

Definition at line 1509 of file eztemplate.php.

References warning().

Referenced by unsetLocalVariable().

## ◆ validateTemplateFile()

eZTemplate::validateTemplateFile | ( |  | $file,
|  |  | $returnResourceData = `false`
| ) |  |

Validates the template file $file and returns `true` if the file has correct syntax.

Parameters

  $returnResourceData | If `true` then the returned value will be the resourcedata structure

See also
  compileTemplateFile(), fetch()

Definition at line 867 of file eztemplate.php.

References $IsCachingAllowed, appendDebugNodes(), hasErrors(), hasWarnings(), isDebugEnabled(), NODE_ROOT, parse(), resetErrorLog(), RESOURCE_FETCH, resourceData(), and resourceFor().

## ◆ variable()

eZTemplate::variable | ( |  | $var,
|  |  | $namespace = `''`,
|  |  | $attrs = `null`
| ) |  |

Returns the content of the variable $var using namespace $namespace, if $attrs is supplied the result of the attributes is returned.

Parameters

  string | $var |
  string | $namespace | (optional)
  array | $attrs | (optional) Deprecated as of 4.4

Returns
  string|array

Definition at line 1593 of file eztemplate.php.

References eZDebug\writeStrict().

Referenced by elementValue(), and eZNodeviewfunctions\generateNodeViewData().

## ◆ variableAttribute()

eZTemplate::variableAttribute | ( |  | $var,
|  |  | $attrs
| ) |  |

Returns the attribute(s) of the template variable $var, $attrs is an array of attribute names to use iteratively for each new variable returned.

Definition at line 1647 of file eztemplate.php.

## ◆ variableText()

eZTemplate::variableText | ( |  | $var,
|  |  | $namespace = `""`,
|  |  | $attrs = `array()`
| ) |  |

Helper function for creating a displayable text for a variable.

Definition at line 1393 of file eztemplate.php.

## ◆ warning()

eZTemplate::warning | ( |  | $name,
|  |  | $txt,
|  |  | $placement = `false`
| ) |  |

Displays a warning for the function/operator $name and text $txt.

Definition at line 2123 of file eztemplate.php.

References placementText(), and eZDebug\writeWarning().

Referenced by doFunction(), doOperator(), elementValue(), extraParameters(), loadURIData(), loadURIRoot(), missingParameter(), processFunction(), processOperator(), registerResource(), undefinedVariable(), unregisterOperator(), unregisterResource(), and unsetVariable().

## ◆ warningCount()

eZTemplate::warningCount | ( |  | ) |

Returns
  The number of warnings that occured with the last fetch

See also
  hasWarnings()

Definition at line 2333 of file eztemplate.php.

Referenced by hasWarnings().

## ◆ warningLog()

eZTemplate::warningLog | ( |  | ) |

Returns
  waring log.

See also
  warningCount()

Definition at line 2351 of file eztemplate.php.

References $WarningLog.

## Member Data Documentation

## ◆ $AutoloadPathList

eZTemplate::$AutoloadPathList

Definition at line 2682 of file eztemplate.php.

Referenced by autoloadPathList().

## ◆ $CurrentLocalVariablesNames

eZTemplate::$CurrentLocalVariablesNames

Definition at line 2663 of file eztemplate.php.

## ◆ $DefaultResource

eZTemplate::$DefaultResource

Reference to the default resource object.

Definition at line 2638 of file eztemplate.php.

Referenced by resourceFor(), and resourceHandler().

## ◆ $DoCounter

eZTemplate::$DoCounter

Definition at line 2694 of file eztemplate.php.

## ◆ $ElseifCounter

eZTemplate::$ElseifCounter

Definition at line 2695 of file eztemplate.php.

## ◆ $ErrorLog

eZTemplate::$ErrorLog

Array containing all errors occured during a fetch.

Definition at line 2678 of file eztemplate.php.

Referenced by errorLog().

## ◆ $factory

eZTemplate::$factory = false
| static protected

Definition at line 2714 of file eztemplate.php.

## ◆ $ForCounter

eZTemplate::$ForCounter

Definition at line 2692 of file eztemplate.php.

## ◆ $ForeachCounter

eZTemplate::$ForeachCounter

Definition at line 2691 of file eztemplate.php.

## ◆ $FunctionAttributes

eZTemplate::$FunctionAttributes

An associative array of function attributes.

Definition at line 2669 of file eztemplate.php.

## ◆ $Functions

eZTemplate::$Functions

An associative array of functions.

Definition at line 2667 of file eztemplate.php.

## ◆ $IncludeOutput

eZTemplate::$IncludeOutput

Included outputs, usually performed by custom functions.

Definition at line 2644 of file eztemplate.php.

## ◆ $IncludeText

eZTemplate::$IncludeText

Included texts, usually performed by custom functions.

Definition at line 2642 of file eztemplate.php.

## ◆ $instance

eZTemplate::$instance
| static protected

Definition at line 2706 of file eztemplate.php.

Referenced by factory(), and instance().

## ◆ $IsCachingAllowed

eZTemplate::$IsCachingAllowed

`true` if caching is allowed

Definition at line 2675 of file eztemplate.php.

Referenced by isCachingAllowed(), and validateTemplateFile().

## ◆ $LDelim

eZTemplate::$LDelim

The left delimiter used for parsing.

Definition at line 2648 of file eztemplate.php.

Referenced by leftDelimiter().

## ◆ $Level

eZTemplate::$Level = 0

include level

Definition at line 2684 of file eztemplate.php.

## ◆ $Literals

eZTemplate::$Literals

An associative array of literal tags.

Definition at line 2671 of file eztemplate.php.

## ◆ $LocalVariablesNamesStack

eZTemplate::$LocalVariablesNamesStack

Last element of this stack contains names of all variables created in the innermost template, for them to be destroyed after the template execution finishes.

Definition at line 2661 of file eztemplate.php.

## ◆ $MaxLevel

eZTemplate::$MaxLevel = 40

Definition at line 2685 of file eztemplate.php.

## ◆ $MaxLevelWarning

eZTemplate::$MaxLevelWarning

Definition at line 2719 of file eztemplate.php.

Referenced by processURI().

## ◆ $Operators

eZTemplate::$Operators

An associative array of operators.

Definition at line 2665 of file eztemplate.php.

## ◆ $RDelim

eZTemplate::$RDelim

The right delimiter used for parsing.

Definition at line 2650 of file eztemplate.php.

Referenced by rightDelimiter().

## ◆ $Resources

eZTemplate::$Resources

Associative array of resource objects

Definition at line 2636 of file eztemplate.php.

## ◆ $ShowDetails

eZTemplate::$ShowDetails = false

True if output details is to be shown.

Definition at line 2673 of file eztemplate.php.

## ◆ $TemplateFetchList

eZTemplate::$TemplateFetchList

Definition at line 2720 of file eztemplate.php.

Referenced by templateFetchList().

## ◆ $TemplatesUsageStatistics

eZTemplate::$TemplatesUsageStatistics

A list of templates used by a rendered page.

Definition at line 2688 of file eztemplate.php.

## ◆ $TestCompile

eZTemplate::$TestCompile

Definition at line 2698 of file eztemplate.php.

Referenced by resourceData(), and testCompile().

## ◆ $Text

eZTemplate::$Text

The original template text.

Definition at line 2640 of file eztemplate.php.

## ◆ $TimeStamp

eZTemplate::$TimeStamp

The timestamp of the template when it was last modified.

Definition at line 2646 of file eztemplate.php.

## ◆ $Tree

eZTemplate::$Tree

The resulting object tree of the template.

Definition at line 2653 of file eztemplate.php.

## ◆ $Variables

eZTemplate::$Variables

An associative array of template variables.

Definition at line 2655 of file eztemplate.php.

## ◆ $WarningLog

eZTemplate::$WarningLog

Array containing all warnings occured during a fetch.

Definition at line 2680 of file eztemplate.php.

Referenced by warningLog().

## ◆ $WhileCounter

eZTemplate::$WhileCounter

Definition at line 2693 of file eztemplate.php.

## ◆ DEBUG_INTERNALS

const eZTemplate::DEBUG_INTERNALS = false

Definition at line 288 of file eztemplate.php.

Referenced by isDebugEnabled().

## ◆ ELEMENT_COMMENT

const eZTemplate::ELEMENT_COMMENT = 6

Definition at line 208 of file eztemplate.php.

Referenced by eZTemplateMultiPassParser\parseIntoTextElements(), and eZTemplateMultiPassParser\parseWhitespaceRemoval().

## ◆ ELEMENT_END_TAG

const eZTemplate::ELEMENT_END_TAG = 4

Definition at line 206 of file eztemplate.php.

Referenced by eZTemplateMultiPassParser\parseIntoTextElements(), eZTemplateMultiPassParser\parseIntoTree(), and eZTemplateMultiPassParser\parseWhitespaceRemoval().

## ◆ ELEMENT_NORMAL_TAG

const eZTemplate::ELEMENT_NORMAL_TAG = 3

Definition at line 205 of file eztemplate.php.

Referenced by eZTemplateMultiPassParser\parseIntoTextElements(), eZTemplateMultiPassParser\parseIntoTree(), and eZTemplateMultiPassParser\parseWhitespaceRemoval().

## ◆ ELEMENT_SINGLE_TAG

const eZTemplate::ELEMENT_SINGLE_TAG = 2

Definition at line 204 of file eztemplate.php.

Referenced by eZTemplateMultiPassParser\parseIntoTextElements(), eZTemplateMultiPassParser\parseIntoTree(), and eZTemplateMultiPassParser\parseWhitespaceRemoval().

## ◆ ELEMENT_TEXT

const eZTemplate::ELEMENT_TEXT = 1

Definition at line 203 of file eztemplate.php.

Referenced by eZTemplateMultiPassParser\parseIntoTextElements(), eZTemplateMultiPassParser\parseIntoTree(), and eZTemplateMultiPassParser\parseWhitespaceRemoval().

## ◆ ELEMENT_VARIABLE

const eZTemplate::ELEMENT_VARIABLE = 5

Definition at line 207 of file eztemplate.php.

Referenced by eZTemplateMultiPassParser\parseIntoTextElements(), eZTemplateMultiPassParser\parseIntoTree(), and eZTemplateMultiPassParser\parseWhitespaceRemoval().

## ◆ FILE_ERRORS

const eZTemplate::FILE_ERRORS = 1

Definition at line 290 of file eztemplate.php.

Referenced by error().

## ◆ NAMESPACE_SCOPE_GLOBAL

const eZTemplate::NAMESPACE_SCOPE_GLOBAL = 1

Definition at line 284 of file eztemplate.php.

Referenced by elementValue(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), and eZTemplateElementParser\variableEndPos().

## ◆ NAMESPACE_SCOPE_LOCAL

const eZTemplate::NAMESPACE_SCOPE_LOCAL = 2

Definition at line 285 of file eztemplate.php.

Referenced by elementValue(), eZTemplateLoop\parseParamVarName(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), eZTemplateDefFunction\templateNodeTransformation(), and eZTemplateElementParser\variableEndPos().

## ◆ NAMESPACE_SCOPE_RELATIVE

const eZTemplate::NAMESPACE_SCOPE_RELATIVE = 3

Definition at line 286 of file eztemplate.php.

Referenced by elementValue(), eZObjectForwarder\resourceAcquisitionTransformation(), eZObjectForwarder\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateIncludeFunction\templateNodeTransformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), eZTemplateToolbarFunction\templateNodeTransformation(), and eZTemplateElementParser\variableEndPos().

## ◆ NODE_FUNCTION

const eZTemplate::NODE_FUNCTION = 4

Definition at line 213 of file eztemplate.php.

Referenced by eZTemplateMultiPassParser\parseIntoTree(), eZTemplateIfFunction\process(), eZTemplateSectionFunction\process(), eZTemplateSwitchFunction\process(), eZTemplateCompiledLoop\processChildren(), eZTemplateLoop\processChildren(), processNode(), eZTemplateCompiler\processNodeCombiningChildren(), eZTemplateCompiler\processNodeTransformationChild(), eZTemplateCompiler\processRemoveNodePlacement(), eZTemplateCompiler\processStaticOptimizations(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), and eZTemplateSwitchFunction\templateNodeTransformation().

## ◆ NODE_INTERNAL

const eZTemplate::NODE_INTERNAL = 100

Definition at line 217 of file eztemplate.php.

Referenced by eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_CODE_PIECE

const eZTemplate::NODE_INTERNAL_CODE_PIECE = 101

Definition at line 218 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createCodePieceNode(), eZTemplateCompiler\generatePHPCodeChildren(), and eZTemplateOptimizer\optimizeVariable().

## ◆ NODE_INTERNAL_ERROR

const eZTemplate::NODE_INTERNAL_ERROR = 121

Definition at line 227 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createErrorNode(), and eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_NAMESPACE_CHANGE

const eZTemplate::NODE_INTERNAL_NAMESPACE_CHANGE = 103

Definition at line 223 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createNamespaceChangeNode(), and eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_NAMESPACE_RESTORE

const eZTemplate::NODE_INTERNAL_NAMESPACE_RESTORE = 104

Definition at line 224 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createNamespaceRestoreNode().

## ◆ NODE_INTERNAL_OUTPUT_ASSIGN

const eZTemplate::NODE_INTERNAL_OUTPUT_ASSIGN = 150

Definition at line 232 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createWriteToOutputVariableNode(), and eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_OUTPUT_DECREASE

const eZTemplate::NODE_INTERNAL_OUTPUT_DECREASE = 153

Definition at line 235 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createOutputVariableDecreaseNode(), and eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_OUTPUT_INCREASE

const eZTemplate::NODE_INTERNAL_OUTPUT_INCREASE = 152

Definition at line 234 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createOutputVariableIncreaseNode(), and eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_OUTPUT_READ

const eZTemplate::NODE_INTERNAL_OUTPUT_READ = 151

Definition at line 233 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createAssignFromOutputVariableNode(), and eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_OUTPUT_SPACING_INCREASE

const eZTemplate::NODE_INTERNAL_OUTPUT_SPACING_INCREASE = 160

Definition at line 237 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createSpacingIncreaseNode(), eZTemplateCompiler\generatePHPCodeChildren(), and eZTemplateOptimizer\optimize().

## ◆ NODE_INTERNAL_RESOURCE_ACQUISITION

const eZTemplate::NODE_INTERNAL_RESOURCE_ACQUISITION = 140

Definition at line 229 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createResourceAcquisitionNode(), eZTemplateCompiler\generatePHPCodeChildren(), and eZTemplateOptimizer\optimize().

## ◆ NODE_INTERNAL_SPACING_DECREASE

const eZTemplate::NODE_INTERNAL_SPACING_DECREASE = 161

Definition at line 238 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createSpacingDecreaseNode(), eZTemplateCompiler\generatePHPCodeChildren(), and eZTemplateOptimizer\optimize().

## ◆ NODE_INTERNAL_VARIABLE_SET

const eZTemplate::NODE_INTERNAL_VARIABLE_SET = 105

Definition at line 220 of file eztemplate.php.

Referenced by eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_VARIABLE_UNSET

const eZTemplate::NODE_INTERNAL_VARIABLE_UNSET = 102

Definition at line 221 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createVariableUnsetNode(), and eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_INTERNAL_WARNING

const eZTemplate::NODE_INTERNAL_WARNING = 120

Definition at line 226 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createWarningNode(), and eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_OPERATOR

const eZTemplate::NODE_OPERATOR = 5

Definition at line 214 of file eztemplate.php.

Referenced by eZTemplateCompiler\processRemoveNodePlacement().

## ◆ NODE_OPTIMIZED_INIT

const eZTemplate::NODE_OPTIMIZED_INIT = 201

Definition at line 240 of file eztemplate.php.

Referenced by eZTemplateOptimizer\optimize().

## ◆ NODE_OPTIMIZED_RESOURCE_ACQUISITION

const eZTemplate::NODE_OPTIMIZED_RESOURCE_ACQUISITION = 141

Definition at line 230 of file eztemplate.php.

Referenced by eZTemplateCompiler\generatePHPCodeChildren(), and eZTemplateOptimizer\optimizeResourceAcquisition().

## ◆ NODE_ROOT

const eZTemplate::NODE_ROOT = 1

Definition at line 210 of file eztemplate.php.

Referenced by __construct(), compileTemplateFile(), eZTemplateCompiler\generatePHPCode(), eZTemplateCompiler\generatePHPCodeChildren(), loadURIRoot(), processNode(), eZTemplateCompiler\processNodeCombining(), eZTemplateCompiler\processNodeCombiningChildren(), eZTemplateCompiler\processNodeTransformationChild(), eZTemplateCompiler\processNodeTransformationRoot(), eZTemplateCompiler\processRemoveNodePlacement(), eZTemplateCompiler\processStaticOptimizations(), and validateTemplateFile().

## ◆ NODE_TEXT

const eZTemplate::NODE_TEXT = 2

Definition at line 211 of file eztemplate.php.

Referenced by eZTemplateCompiler\combineStaticNodes(), eZTemplateNodeTool\createTextNode(), eZTemplateMultiPassParser\parseIntoTree(), eZTemplateSwitchFunction\process(), processNode(), eZTemplateCompiler\processNodeCombiningChildren(), eZTemplateCompiler\processRemoveNodePlacement(), eZTemplateCompiler\processStaticOptimizations(), and eZTemplateCompiler\staticNodeData().

## ◆ NODE_USER_CUSTOM

const eZTemplate::NODE_USER_CUSTOM = 1000

Definition at line 243 of file eztemplate.php.

Referenced by eZTemplateCompiler\generatePHPCodeChildren().

## ◆ NODE_VARIABLE

const eZTemplate::NODE_VARIABLE = 3

Definition at line 212 of file eztemplate.php.

Referenced by eZTemplateCompiler\combineStaticNodes(), eZTemplateNodeTool\createVariableNode(), eZTemplateMultiPassParser\parseIntoTree(), processNode(), eZTemplateCompiler\processNodeCombiningChildren(), eZTemplateCompiler\processNodeTransformationChild(), eZTemplateCompiler\processRemoveNodePlacement(), eZTemplateCompiler\processStaticOptimizations(), and eZTemplateCompiler\staticNodeData().

## ◆ RESOURCE_FETCH

const eZTemplate::RESOURCE_FETCH = 1

Definition at line 200 of file eztemplate.php.

Referenced by compileTemplateFile(), eZTemplateFileResource\handleResourceData(), loadURIData(), eZObjectForwarder\resourceAcquisitionTransformation(), eZTemplateDesignResource\templateNodeTransformation(), eZTemplateFileResource\templateNodeTransformation(), and validateTemplateFile().

## ◆ RESOURCE_QUERY

const eZTemplate::RESOURCE_QUERY = 2

Definition at line 201 of file eztemplate.php.

Referenced by eZTemplateFileResource\handleResourceData().

## ◆ TYPE_ALL

const eZTemplate::TYPE_ALL = 63

Definition at line 278 of file eztemplate.php.

## ◆ TYPE_ARRAY

const eZTemplate::TYPE_ARRAY = 8

Definition at line 254 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createArrayElement(), eZTemplateCompiler\createStaticVariableData(), elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateNodeTool\isArrayElement(), eZTemplateNodeTool\isConstantElement(), and eZTemplateCompiler\staticNodeData().

## ◆ TYPE_ATTRIBUTE

const eZTemplate::TYPE_ATTRIBUTE = 5

Definition at line 251 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createAttributeLookupElement(), eZTemplateNodeTool\createOperatorElement(), elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateOptimizer\optimizeResourceAcquisition(), eZTemplateOptimizer\optimizeVariable(), eZTemplateElementParser\parseVariableTag(), and eZTemplateElementParser\templateTypeName().

## ◆ TYPE_ATTRIBUTE_BIT

const eZTemplate::TYPE_ATTRIBUTE_BIT = 16

Definition at line 273 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_BASIC

const eZTemplate::TYPE_BASIC = 47

Definition at line 280 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_BOOLEAN

const eZTemplate::TYPE_BOOLEAN = 7

Definition at line 253 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createBooleanElement(), eZTemplateCompiler\createStaticVariableData(), eZTemplateNodeTool\createVariableNode(), elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateNodeTool\isBooleanElement(), eZTemplateNodeTool\isConstantElement(), and eZTemplateCompiler\staticNodeData().

## ◆ TYPE_DYNAMIC_ARRAY

const eZTemplate::TYPE_DYNAMIC_ARRAY = 9

Definition at line 255 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createDynamicArrayElement(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), and eZTemplateNodeTool\isDynamicArrayElement().

## ◆ TYPE_IDENTIFIER

const eZTemplate::TYPE_IDENTIFIER = 3

Definition at line 249 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createIdentifierElement(), elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateNodeTool\isConstantElement(), eZTemplateNodeTool\isIdentifierElement(), eZTemplateNodeTool\isStringElement(), eZTemplateElementParser\parseVariableTag(), eZTemplateCompiler\staticNodeData(), and eZTemplateElementParser\templateTypeName().

## ◆ TYPE_IDENTIFIER_BIT

const eZTemplate::TYPE_IDENTIFIER_BIT = 4

Definition at line 271 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_INTERNAL

const eZTemplate::TYPE_INTERNAL = 100

Definition at line 257 of file eztemplate.php.

Referenced by eZTemplateCompiler\inspectVariableData().

## ◆ TYPE_INTERNAL_CODE_PIECE

const eZTemplate::TYPE_INTERNAL_CODE_PIECE = 101

Definition at line 258 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createCodePieceElement(), and eZTemplateNodeTool\isInternalCodePiece().

## ◆ TYPE_INTERNAL_STOP

const eZTemplate::TYPE_INTERNAL_STOP = 999

Definition at line 266 of file eztemplate.php.

Referenced by eZTemplateCompiler\inspectVariableData().

## ◆ TYPE_MODIFIER_MASK

const eZTemplate::TYPE_MODIFIER_MASK = 48

Definition at line 282 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_NONE

const eZTemplate::TYPE_NONE = 0

Definition at line 276 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_NUMERIC

const eZTemplate::TYPE_NUMERIC = 2

Definition at line 248 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createNumericElement(), eZTemplateCompiler\createStaticVariableData(), eZTemplateNodeTool\createVariableNode(), elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateNodeTool\isConstantElement(), eZTemplateNodeTool\isNumericElement(), eZTemplateMultiPassParser\parseIntoTree(), eZTemplateMultiPassParser\parseSectionFunction(), eZTemplateMultiPassParser\parseSetFunction(), eZTemplateElementParser\parseVariableTag(), eZTemplateCompiler\staticNodeData(), and eZTemplateElementParser\templateTypeName().

## ◆ TYPE_NUMERIC_BIT

const eZTemplate::TYPE_NUMERIC_BIT = 2

Definition at line 270 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_OPERATOR

const eZTemplate::TYPE_OPERATOR = 6

Definition at line 252 of file eztemplate.php.

Referenced by elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateElementParser\parseVariableTag(), and eZTemplateCompiler\processElementTransformationChild().

## ◆ TYPE_OPERATOR_BIT

const eZTemplate::TYPE_OPERATOR_BIT = 32

Definition at line 274 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_OPTIMIZED_ARRAY_LOOKUP

const eZTemplate::TYPE_OPTIMIZED_ARRAY_LOOKUP = 202

Definition at line 262 of file eztemplate.php.

Referenced by eZTemplateCompiler\generateVariableDataCode(), and eZTemplateOptimizer\optimizeVariable().

## ◆ TYPE_OPTIMIZED_ATTRIBUTE_LOOKUP

const eZTemplate::TYPE_OPTIMIZED_ATTRIBUTE_LOOKUP = 204

Definition at line 264 of file eztemplate.php.

Referenced by eZTemplateCompiler\generateVariableDataCode(), and eZTemplateOptimizer\optimizeVariable().

## ◆ TYPE_OPTIMIZED_CONTENT_CALL

const eZTemplate::TYPE_OPTIMIZED_CONTENT_CALL = 203

Definition at line 263 of file eztemplate.php.

Referenced by eZTemplateCompiler\generateVariableDataCode(), and eZTemplateOptimizer\optimizeVariable().

## ◆ TYPE_OPTIMIZED_NODE

const eZTemplate::TYPE_OPTIMIZED_NODE = 201

Definition at line 261 of file eztemplate.php.

Referenced by eZTemplateCompiler\generateVariableDataCode(), and eZTemplateOptimizer\optimizeVariable().

## ◆ TYPE_PHP_VARIABLE

const eZTemplate::TYPE_PHP_VARIABLE = 102

Definition at line 259 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createPHPVariableElement(), eZTemplateNodeTool\createVariableNode(), eZTemplateCompiler\generateVariableDataCode(), and eZTemplateNodeTool\isPHPVariableElement().

## ◆ TYPE_STRING

const eZTemplate::TYPE_STRING = 1

Definition at line 247 of file eztemplate.php.

Referenced by eZTemplateCompiler\createStaticVariableData(), eZTemplateNodeTool\createStringElement(), eZTemplateNodeTool\createVariableNode(), elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateNodeTool\isConstantElement(), eZTemplateNodeTool\isStringElement(), eZTemplateElementParser\parseVariableTag(), eZTemplateCompiler\staticNodeData(), and eZTemplateElementParser\templateTypeName().

## ◆ TYPE_STRING_BIT

const eZTemplate::TYPE_STRING_BIT = 1

Definition at line 269 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_VARIABLE

const eZTemplate::TYPE_VARIABLE = 4

Definition at line 250 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createVariableElement(), elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateNodeTool\isVariableElement(), eZTemplateOptimizer\optimizeResourceAcquisition(), eZTemplateOptimizer\optimizeVariable(), eZTemplateElementParser\parseVariableTag(), and eZTemplateElementParser\templateTypeName().

## ◆ TYPE_VARIABLE_BIT

const eZTemplate::TYPE_VARIABLE_BIT = 8

Definition at line 272 of file eztemplate.php.

Referenced by eZTemplateElementParser\parseVariableTag().

## ◆ TYPE_VOID

const eZTemplate::TYPE_VOID = 0

Definition at line 246 of file eztemplate.php.

Referenced by eZTemplateNodeTool\createVoidElement(), elementValue(), eZTemplateCompiler\generateVariableDataCode(), eZTemplateCompiler\inspectVariableData(), eZTemplateNodeTool\isConstantElement(), and processOperator().

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

- eztemplate.php

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