class CachingIterator extends CachingIterator implements Countable

internal  
 

Smarter caching iterator.

Properties

bool read-only $first
bool read-only $last
bool read-only $empty
bool read-only $odd
bool read-only $even
int read-only $counter
mixed read-only $nextKey
mixed read-only $nextValue

Methods

__construct($iterator)

No description

bool
isFirst($width = NULL)

Is the current element the first one?

bool
isLast($width = NULL)

Is the current element the last one?

bool
isEmpty()

Is the iterator empty?

bool
isOdd()

Is the counter odd?

bool
isEven()

Is the counter even?

int
getCounter()

Returns the counter.

int
count()

Returns the count of elements.

void
next()

Forwards to the next element.

void
rewind()

Rewinds the Iterator.

mixed
getNextKey()

Returns the next key.

mixed
getNextValue()

Returns the next element.

__call($name, $args)

Call to undefined method.

__get($name)

Returns property value.

__set($name, $value)

Access to undeclared property.

bool
__isset($name)

Is property defined?

__unset($name)

Access to undeclared property.

Details

at line 32
__construct($iterator)

No description

Parameters

$iterator

at line 59
bool isFirst($width = NULL)

Is the current element the first one?

Parameters

$width

Return Value

bool

at line 70
bool isLast($width = NULL)

Is the current element the last one?

Parameters

$width

Return Value

bool

at line 80
bool isEmpty()

Is the iterator empty?

Return Value

bool

at line 90
bool isOdd()

Is the counter odd?

Return Value

bool

at line 100
bool isEven()

Is the counter even?

Return Value

bool

at line 110
int getCounter()

Returns the counter.

Return Value

int

at line 120
int count()

Returns the count of elements.

Return Value

int

at line 136
void next()

Forwards to the next element.

Return Value

void

at line 149
void rewind()

Rewinds the Iterator.

Return Value

void

at line 160
mixed getNextKey()

Returns the next key.

Return Value

mixed

at line 170
mixed getNextValue()

Returns the next element.

Return Value

mixed

at line 183
__call($name, $args)

Call to undefined method.

Parameters

$name
$args

Exceptions

LogicException

at line 193
__get($name)

Returns property value.

Parameters

$name

Exceptions

LogicException

at line 207
__set($name, $value)

Access to undeclared property.

Parameters

$name
$value

Exceptions

LogicException

at line 217
bool __isset($name)

Is property defined?

Parameters

$name

Return Value

bool

at line 227
__unset($name)

Access to undeclared property.

Parameters

$name

Exceptions

LogicException