class CachingIterator extends CachingIterator implements Countable

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.

mixed
__call($name, $args)

Call to undefined method.

mixed
__get($name)

Returns property value. Do not call directly.

void
__set($name, $value)

Sets value of a property. Do not call directly.

bool
__isset($name)

Is property defined?

void
__unset($name)

Access to undeclared property.

Details

at line 34
__construct($iterator)

No description

Parameters

$iterator

at line 61
bool isFirst($width = NULL)

Is the current element the first one?

Parameters

$width

Return Value

bool

at line 72
bool isLast($width = NULL)

Is the current element the last one?

Parameters

$width

Return Value

bool

at line 82
bool isEmpty()

Is the iterator empty?

Return Value

bool

at line 92
bool isOdd()

Is the counter odd?

Return Value

bool

at line 102
bool isEven()

Is the counter even?

Return Value

bool

at line 112
int getCounter()

Returns the counter.

Return Value

int

at line 122
int count()

Returns the count of elements.

Return Value

int

at line 138
void next()

Forwards to the next element.

Return Value

void

at line 151
void rewind()

Rewinds the Iterator.

Return Value

void

at line 162
mixed getNextKey()

Returns the next key.

Return Value

mixed

at line 172
mixed getNextValue()

Returns the next element.

Return Value

mixed

at line 188
mixed __call($name, $args)

Call to undefined method.

Parameters

$name
$args

Return Value

mixed

Exceptions

MemberAccessException

at line 200
mixed __get($name)

Returns property value. Do not call directly.

Parameters

$name

Return Value

mixed

property value

Exceptions

MemberAccessException

at line 213
void __set($name, $value)

Sets value of a property. Do not call directly.

Parameters

$name
$value

Return Value

void

Exceptions

MemberAccessException

at line 224
bool __isset($name)

Is property defined?

Parameters

$name

Return Value

bool

at line 236
void __unset($name)

Access to undeclared property.

Parameters

$name

Return Value

void

Exceptions

MemberAccessException