PVIterator

Implements \Iterator

A class used for iterating over items in loops.

package

data

Methods

Initializes the iterater of information to iterate through.

__construct(array $array = array()) : void
access

public

Arguments

$array

array

An array of information to make iterable

Counts the number of elements currently in the iterator.

count() : integer
access

public

Response

integer

count

Returns the value of the current index in the array.

current() : mixed
access

public

Response

mixed

$value The data stored in the current index

Returns the data as stored in the object

getData() 

Returns the key value of the current index

key() : mixed
access

public

Response

mixed

$key

Moves the pointer to the last index in the array and returns the value of the last index

last() : mixed
access

public

Response

mixed

$value The value of the last index

Returns the value of the next pointer in the array

next() : mixed
access

public

Response

mixed

$value The data at the location of the next pointer

Returns the value of the previous pointer in the array

previous() : mixed
access

public

Response

mixed

$value The data at the location of the previous pointer

Sets the pointer to the first index in the array

rewind() : void
access

public

Determines if the key exist, and then returns the associated data

valid() : mixed
access

public

Response

mixed

$value The validated data

Properties

The items to iterate over

data : 

Type(s)