Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

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

WHILE loop. More...

## Public Member Functions
| functionList ()
| attributeList ()
| functionTemplateHints ()
| templateNodeTransformation ( $functionName, &$node, $tpl, &$parameters, $privateData)
| process ( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace)
| hasChildren ()

## Public Attributes
const | FUNCTION_NAME = 'while'

## Detailed Description

WHILE loop.

Syntax:

{while <condition> [sequence <array> as $seqVar] }
[{delimiter}...{/delimiter}]
[{break}]
[{continue}]
[{skip}]
{/while}

Example:

{while ne( $var, false() ) }
I like big trucks
{/while}

Definition at line 34 of file eztemplatewhilefunction.php.

## Member Function Documentation

## ◆ attributeList()

eZTemplateWhileFunction::attributeList | ( |  | ) |

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

Definition at line 52 of file eztemplatewhilefunction.php.

## ◆ functionList()

eZTemplateWhileFunction::functionList | ( |  | ) |

Returns an array of the function names, required for eZTemplate::registerFunctions.

Definition at line 41 of file eztemplatewhilefunction.php.

References FUNCTION_NAME.

## ◆ functionTemplateHints()

eZTemplateWhileFunction::functionTemplateHints | ( |  | ) |

Returns the array with hits for the template compiler.

Definition at line 64 of file eztemplatewhilefunction.php.

References FUNCTION_NAME.

## ◆ hasChildren()

eZTemplateWhileFunction::hasChildren | ( |  | ) |

Returns true, telling the template parser that the function can have children.

Definition at line 146 of file eztemplatewhilefunction.php.

## ◆ process()

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

Actually executes the function and its children (in processed mode).

Definition at line 113 of file eztemplatewhilefunction.php.

References FUNCTION_NAME, and eZDebug\writeError().

## ◆ templateNodeTransformation()

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

Compiles the function and its children into PHP code.

Definition at line 75 of file eztemplatewhilefunction.php.

References eZTemplateNodeTool\createCodePieceNode(), eZTemplateNodeTool\createSpacingDecreaseNode(), eZTemplateNodeTool\createSpacingIncreaseNode(), eZTemplateNodeTool\createVariableNode(), eZTemplateNodeTool\createVariableUnsetNode(), eZTemplateNodeTool\extractFunctionNodePlacement(), and FUNCTION_NAME.

## Member Data Documentation

## ◆ FUNCTION_NAME

const eZTemplateWhileFunction::FUNCTION_NAME = 'while'

Definition at line 36 of file eztemplatewhilefunction.php.

Referenced by functionList(), functionTemplateHints(), process(), and templateNodeTransformation().

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

- eztemplatewhilefunction.php

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