Gumbo_Iterator



Iterator Class

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Implements interfaces:

Class Variables

int $_current =  0 [line 43]
array $_keys = array () [line 40]
array $_list = array () [line 38]

Class Methods

public Gumbo_Iterator __construct ( array|Gumbo_Interface_List $list ) [line 57]

Constructor

The constructor requires an array to be given. The object will save the keys, keeping array references on the original array. The supplied array can contain any type of values.

Parameter(s):

  • throws:  Gumbo_Exception

[ Top ]
public mixed current ( ) [line 87]

Returns the current element


[ Top ]
public int getCurrent ( ) [line 156]

Returns the current incremental element number

Implementation of:
Gumbo_Interface_Iterator::getCurrent()

[ Top ]
public array getKeys ( ) [line 140]

Returns the array of keys in the object

Implementation of:
Gumbo_Interface_Iterator::getKeys()

[ Top ]
public array getList ( ) [line 148]

Returns the full array list

Implementation of:
Gumbo_Interface_Iterator::getList()

[ Top ]
public int getTotal ( ) [line 164]

Returns the total number of elements in the Iterator

Implementation of:
Gumbo_Interface_Iterator::getTotal()

[ Top ]
public int key ( ) [line 98]

Returns the current key value


[ Top ]
public void next ( ) [line 108]

Moves the target to the next element


[ Top ]
public void rewind ( ) [line 115]

Resets the Iterator


[ Top ]
public bool valid ( ) [line 123]

Checks if the current element is valid


[ Top ]