eZ Publish  [4.2]
eZTemplateLoop Class Reference

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

List of all members.

Public Member Functions

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

Public Attributes

 $CurrentNamespace
 $delimiter
 $FunctionChildren
 $FunctionName
 $FunctionParameters
 $FunctionPlacement
 $Initialized
 $LoopVariablesNames
 $RootNamespace
 $Sequence
 $SequenceVarName
 $SkipDelimiter
 $SkipSequenceIncrement
 $TextElements
 $Tpl

Detailed Description

Code common for the loop functions in processed mode.

Definition at line 64 of file eztemplateloop.php.


Member Function Documentation

eZTemplateLoop::cleanup ( )

Destroys template variables defined by the loop.

Definition at line 170 of file eztemplateloop.php.

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

Definition at line 66 of file eztemplateloop.php.

eZTemplateLoop::hasSequence ( )

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

Definition at line 161 of file eztemplateloop.php.

Referenced by incrementSequence(), and setSequenceVar().

eZTemplateLoop::incrementSequence ( )

Increment current sequence value.

Definition at line 152 of file eztemplateloop.php.

eZTemplateLoop::initialized ( )
Returns:
true if the object has been correctly initialized, false otherwise

Definition at line 123 of file eztemplateloop.php.

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 363 of file eztemplateloop.php.

Referenced by processFunctionParameters().

eZTemplateLoop::parseParamValue ( paramName,
&$  dst 
)

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

Parameters:
$paramNameParameter name.
$dstWhere to store parameter value.
Returns:
false if specified parameter is not found or it is wrong, otherwise true is returned.

Definition at line 345 of file eztemplateloop.php.

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:
$paramNameParameter name.
$dstWhere to store parameter value.
Returns:
false if specified parameter is not found or it is wrong, otherwise true is returned.

Definition at line 286 of file eztemplateloop.php.

Referenced by processFunctionParameters().

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

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

Parameters:
$paramNameParameter name.
$dstWhere to store parameter value.
$isProxyObjectboolean 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 315 of file eztemplateloop.php.

eZTemplateLoop::processChildren ( )

Definition at line 184 of file eztemplateloop.php.

eZTemplateLoop::processDelimiter ( index = false)

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

Parameters:
$indexis 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 250 of file eztemplateloop.php.

eZTemplateLoop::processFunctionParameters ( )
Returns:
true on success, false otherwise.

Definition at line 94 of file eztemplateloop.php.

Referenced by eZTemplateLoop().

eZTemplateLoop::resetIteration ( )

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

Definition at line 143 of file eztemplateloop.php.

eZTemplateLoop::setSequenceVar ( )

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

Definition at line 131 of file eztemplateloop.php.


Member Data Documentation

eZTemplateLoop::$CurrentNamespace

Definition at line 387 of file eztemplateloop.php.

eZTemplateLoop::$delimiter

Definition at line 382 of file eztemplateloop.php.

eZTemplateLoop::$FunctionChildren

Definition at line 377 of file eztemplateloop.php.

eZTemplateLoop::$FunctionName

Definition at line 375 of file eztemplateloop.php.

eZTemplateLoop::$FunctionParameters

Definition at line 376 of file eztemplateloop.php.

eZTemplateLoop::$FunctionPlacement

Definition at line 378 of file eztemplateloop.php.

eZTemplateLoop::$Initialized

Definition at line 389 of file eztemplateloop.php.

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 397 of file eztemplateloop.php.

eZTemplateLoop::$RootNamespace

Definition at line 386 of file eztemplateloop.php.

eZTemplateLoop::$Sequence

Definition at line 390 of file eztemplateloop.php.

eZTemplateLoop::$SequenceVarName

Definition at line 391 of file eztemplateloop.php.

eZTemplateLoop::$SkipDelimiter

Definition at line 380 of file eztemplateloop.php.

eZTemplateLoop::$SkipSequenceIncrement

Definition at line 381 of file eztemplateloop.php.

eZTemplateLoop::$TextElements

Definition at line 385 of file eztemplateloop.php.

eZTemplateLoop::$Tpl

Definition at line 384 of file eztemplateloop.php.


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