## Class TStackIterator

Description

Implements interfaces:

TStackIterator class

TStackIterator implements Iterator interface.

TStackIterator is used by TStack. It allows TStack to return a new iterator for traversing the items in the list.

- since: 3.0
- version: $Id: TStack.php 1980 2007-05-30 23:27:00Z knut $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Collections/TStack.php (line 188)

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

Constructor.

- access: public

TStackIterator __construct (array &$data)

- array &$data: the data to be iterated through

current (line 238)

Returns the current array item.

This method is required by the interface Iterator.

- return: the current array item
- access: public

mixed current ()
key (line 228)

Returns the key of the current array item.

This method is required by the interface Iterator.

- return: the key of the current array item
- access: public

integer key ()
next (line 247)

Moves the internal pointer to the next array item.

This method is required by the interface Iterator.

- access: public

void next ()
rewind (line 218)

Rewinds internal array pointer.

This method is required by the interface Iterator.

- access: public

void rewind ()
valid (line 257)

Returns whether there is an item at current position.

This method is required by the interface Iterator.

- access: public

boolean valid ()

Documentation generated on Sun, 30 Sep 2007 19:17:30 -0400 by phpDocumentor 1.3.0RC4