Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

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

Code common for the loop functions in processed mode. More...

## Public Member Functions
| __construct ( $functionName, &$functionParameters, $functionChildren, $functionPlacement, $tpl, &$textElements, $rootNamespace, $currentNamespace)
| processFunctionParameters ()
| initialized ()
| setSequenceVar ()
| resetIteration ()
| incrementSequence ()
| hasSequence ()
| cleanup ()
| processChildren ()
| processDelimiter ( $index=false)
| parseParamVarName ( $paramName, &$dst)
| parseScalarParamValue ( $paramName, &$dst, &$isProxyObject)
| parseParamValue ( $paramName, &$dst)
| initLoopVariable ( $varName)

## Public Attributes
| $Delimiter
| $FunctionName
| $FunctionParameters
| $FunctionChildren
| $FunctionPlacement
| $SkipDelimiter
| $SkipSequenceIncrement
| $delimiter
| $Tpl
| $TextElements
| $RootNamespace
| $CurrentNamespace
| $Initialized
| $Sequence
| $SequenceVarName
| $LoopVariablesNames

## Detailed Description

Code common for the loop functions in processed mode.

Definition at line 48 of file eztemplateloop.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZTemplateLoop::__construct | ( |  | $functionName,
|  | & | $functionParameters,
|  |  | $functionChildren,
|  |  | $functionPlacement,
|  |  | $tpl,
|  | & | $textElements,
|  |  | $rootNamespace,
|  |  | $currentNamespace
| ) |  |

Definition at line 51 of file eztemplateloop.php.

References processFunctionParameters().

## Member Function Documentation

## ◆ cleanup()

eZTemplateLoop::cleanup | ( |  | ) |

Destroys template variables defined by the loop.

Definition at line 155 of file eztemplateloop.php.

## ◆ hasSequence()

eZTemplateLoop::hasSequence | ( |  | ) |

Returns true if sequence has been specified for the loop in its parameters.

Definition at line 146 of file eztemplateloop.php.

Referenced by incrementSequence(), and setSequenceVar().

## ◆ incrementSequence()

eZTemplateLoop::incrementSequence | ( |  | ) |

Increment current sequence value.

Definition at line 137 of file eztemplateloop.php.

References hasSequence().

## ◆ initialized()

eZTemplateLoop::initialized | ( |  | ) |

Returns
  true if the object has been correctly initialized, false otherwise

Definition at line 108 of file eztemplateloop.php.

References $Initialized.

## ◆ initLoopVariable()

eZTemplateLoop::initLoopVariable | ( |  | $varName | ) |

Checks if the given loop variable already exists. If it doesn't, store its name for later cleanup. Otherwise shows a warning message.

See also
  eZTemplateLoop::$loopVariablesNames

Definition at line 348 of file eztemplateloop.php.

Referenced by processFunctionParameters().

## ◆ parseParamValue()

eZTemplateLoop::parseParamValue | ( |  | $paramName,
|  | & | $dst
| ) |  |

Parses value the given function parameter and stores it to $dst.

Parameters

  $paramName | Parameter name.
  $dst | Where to store parameter value.

Returns
  false if specified parameter is not found or it is wrong, otherwise true is returned.

Definition at line 330 of file eztemplateloop.php.

## ◆ parseParamVarName()

eZTemplateLoop::parseParamVarName | ( |  | $paramName,
|  | & | $dst
| ) |  |

Parses the given function parameter that is supposed to contain a variable name. Extracted variable name is stored to $dst.

Parameters

  $paramName | Parameter name.
  $dst | Where to store parameter value.

Returns
  false if specified parameter is not found or it is wrong, otherwise true is returned.

Definition at line 271 of file eztemplateloop.php.

References eZTemplate\NAMESPACE_SCOPE_LOCAL.

Referenced by processFunctionParameters().

## ◆ parseScalarParamValue()

eZTemplateLoop::parseScalarParamValue | ( |  | $paramName,
|  | & | $dst,
|  | & | $isProxyObject
| ) |  |

Parses given function parameter and makes sure that it is not a proxy object ({section} loop iterator).

Parameters

  $paramName | Parameter name.
  $dst | Where to store parameter value.
  $isProxyObject | boolean true is stored here if value of the parameter is a proxy object.

Returns
  false if specified parameter is not found or it is wrong, otherwise true is returned.

Definition at line 300 of file eztemplateloop.php.

## ◆ processChildren()

eZTemplateLoop::processChildren | ( |  | ) |

Definition at line 169 of file eztemplateloop.php.

References eZTemplate\NODE_FUNCTION.

## ◆ processDelimiter()

eZTemplateLoop::processDelimiter | ( |  | $index = `false` | ) |

If `$loopCondition` is true, shows delimiter (if one has been specified).

Parameters

  $index | is needed for processing delimiter parameters such as modulo. Is current iteration index.

Returns
  true if the caller loop should break, false otherwise

Definition at line 235 of file eztemplateloop.php.

## ◆ processFunctionParameters()

eZTemplateLoop::processFunctionParameters | ( |  | ) |

Returns
  true on success, false otherwise.

Definition at line 79 of file eztemplateloop.php.

References $FunctionParameters, initLoopVariable(), and parseParamVarName().

Referenced by __construct().

## ◆ resetIteration()

eZTemplateLoop::resetIteration | ( |  | ) |

Should be called each time a new iteration is started. Resets some internal variables.

Definition at line 128 of file eztemplateloop.php.

## ◆ setSequenceVar()

eZTemplateLoop::setSequenceVar | ( |  | ) |

Export current loop sequence value to the template variable specified in loop parameters.

Definition at line 116 of file eztemplateloop.php.

References hasSequence().

## Member Data Documentation

## ◆ $CurrentNamespace

eZTemplateLoop::$CurrentNamespace

Definition at line 372 of file eztemplateloop.php.

## ◆ $Delimiter

eZTemplateLoop::$Delimiter

Definition at line 50 of file eztemplateloop.php.

## ◆ $delimiter

eZTemplateLoop::$delimiter

Definition at line 367 of file eztemplateloop.php.

## ◆ $FunctionChildren

eZTemplateLoop::$FunctionChildren

Definition at line 362 of file eztemplateloop.php.

## ◆ $FunctionName

eZTemplateLoop::$FunctionName

Definition at line 360 of file eztemplateloop.php.

## ◆ $FunctionParameters

eZTemplateLoop::$FunctionParameters

Definition at line 361 of file eztemplateloop.php.

Referenced by processFunctionParameters().

## ◆ $FunctionPlacement

eZTemplateLoop::$FunctionPlacement

Definition at line 363 of file eztemplateloop.php.

## ◆ $Initialized

eZTemplateLoop::$Initialized

Definition at line 374 of file eztemplateloop.php.

Referenced by initialized().

## ◆ $LoopVariablesNames

eZTemplateLoop::$LoopVariablesNames

Before we create a new loop variable, we check if it already exists. If it doesn't, we store its name in this array, so that we know which variables to destroy after the loop execution finishes.

Definition at line 382 of file eztemplateloop.php.

## ◆ $RootNamespace

eZTemplateLoop::$RootNamespace

Definition at line 371 of file eztemplateloop.php.

## ◆ $Sequence

eZTemplateLoop::$Sequence

Definition at line 375 of file eztemplateloop.php.

## ◆ $SequenceVarName

eZTemplateLoop::$SequenceVarName

Definition at line 376 of file eztemplateloop.php.

## ◆ $SkipDelimiter

eZTemplateLoop::$SkipDelimiter

Definition at line 365 of file eztemplateloop.php.

## ◆ $SkipSequenceIncrement

eZTemplateLoop::$SkipSequenceIncrement

Definition at line 366 of file eztemplateloop.php.

## ◆ $TextElements

eZTemplateLoop::$TextElements

Definition at line 370 of file eztemplateloop.php.

## ◆ $Tpl

eZTemplateLoop::$Tpl

Definition at line 369 of file eztemplateloop.php.

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

- eztemplateloop.php

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