eZPublish  4.5
eZTemplateSectionIterator Class Reference

The iterator item in a section loop which works as a proxy. More...

Public Member Functions

 attribute ($name)
 attributes ()
 eZTemplateSectionIterator ()
 hasAttribute ($name)
 setIteratorValues ($item, $key, $index, $number, $sequence, &$last)
 setSequence ($sequence)
 templateValue ()

Detailed Description

The iterator item in a section loop which works as a proxy.

The iterator provides transparent access to iterator items. It will redirect all attribute calls to the iterator item with the exception of a few internal values. The internal values are

  • item - The actual item, provides backwards compatibility
  • key - The current key
  • index - The current index value (starts at 0 and increases with 1 for each element)
  • number - The current index value + 1 (starts at 1 and increases with 1 for each element)
  • sequence - The current sequence value
  • last - The last iterated element item

Member Function Documentation

eZTemplateSectionIterator::attribute (   $name)
the attribute value of either the internal attributes or from the item value if the attribute exists for it.
eZTemplateSectionIterator::attributes ( )
a merged list of attributes from both the internal attributes and the items attributes.
eZTemplateSectionIterator::eZTemplateSectionIterator ( )

Initializes the iterator with empty values.

eZTemplateSectionIterator::hasAttribute (   $name)
true if the attribute $name exists either in the internal attributes or in the item value.
eZTemplateSectionIterator::setIteratorValues (   $item,

Updates the iterator with the current iteration values.

eZTemplateSectionIterator::setSequence (   $sequence)

Updates the current sequence value to $sequence.

eZTemplateSectionIterator::templateValue ( )
the value of the current item for the template system to use.

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