Class TStackIterator

Description

Implements interfaces:

  • Iterator (internal interface)

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.

  • author: Qiang Xue <qiang.xue@gmail.com>
  • version: $Id: TStack.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/TStack.php (line 189)


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

Constructor.

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

Returns the current array item.

This method is required by the interface Iterator.

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

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

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 ()

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

Moves the internal pointer to the next array item.

This method is required by the interface Iterator.

  • access: public
void next ()

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

Rewinds internal array pointer.

This method is required by the interface Iterator.

  • access: public
void rewind ()

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

Returns whether there is an item 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:39:19 +0200 by phpDocumentor 1.4.3