Class TMapIterator

Description

Implements interfaces:

  • Iterator (internal interface)

TMapIterator class

TMapIterator implements Iterator interface.

TMapIterator is used by TMap. It allows TMap to return a new iterator for traversing the items in the map.

  • author: Qiang Xue <qiang.xue@gmail.com>
  • version: $Id: TMap.php 2996 2011-06-20 15:24:57Z ctrlaltca@gmail.com $
  • deprecated: Issue 264 : ArrayIterator should be used instead
  • since: 3.0

Located in /Collections/TMap.php (line 281)


	
			
Method Summary
TMapIterator __construct (array &$data)
mixed current ()
mixed key ()
void next ()
void rewind ()
boolean valid ()
Methods
Constructor __construct (line 300)

Constructor.

  • access: public
TMapIterator __construct (array &$data)
  • array &$data: the data to be iterated through
current (line 330)

Returns the current array element.

This method is required by the interface Iterator.

  • return: the current array element
  • access: public
mixed current ()

Implementation of:
Iterator::current
key (line 320)

Returns the key of the current array element.

This method is required by the interface Iterator.

  • return: the key of the current array element
  • access: public
mixed key ()

Implementation of:
Iterator::key
next (line 339)

Moves the internal pointer to the next array element.

This method is required by the interface Iterator.

  • access: public
void next ()

Implementation of:
Iterator::next
rewind (line 310)

Rewinds internal array pointer.

This method is required by the interface Iterator.

  • access: public
void rewind ()

Implementation of:
Iterator::rewind
valid (line 349)

Returns whether there is an element at current position.

This method is required by the interface Iterator.

  • access: public
boolean valid ()

Implementation of:
Iterator::valid

Documentation generated on Mon, 25 Jun 2012 14:38:41 +0200 by phpDocumentor 1.4.3