CachingIterator
extends CachingIterator
in package
implements
Countable
uses
SmartObject
Smarter caching iterator.
Table of Contents
Interfaces
- Countable
Properties
- $empty : bool
- $even : bool
- $first : bool
- $last : bool
- $nextKey : mixed
- $nextValue : mixed
- $odd : bool
- $counter : int
Methods
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- __get() : mixed
- __isset() : bool
- __set() : void
- __unset() : void
- count() : int
- Returns the count of elements.
- getCounter() : int
- Returns the counter.
- getNextKey() : mixed
- Returns the next key.
- getNextValue() : mixed
- Returns the next element.
- isEmpty() : bool
- Is the iterator empty?
- isEven() : bool
- Is the counter even?
- isFirst() : bool
- Is the current element the first one?
- isLast() : bool
- Is the current element the last one?
- isOdd() : bool
- Is the counter odd?
- next() : void
- Forwards to the next element.
- rewind() : void
- Rewinds the Iterator.
Properties
$empty read-only
public
bool
$empty
$even read-only
public
bool
$even
$first read-only
public
bool
$first
$last read-only
public
bool
$last
$nextKey read-only
public
mixed
$nextKey
$nextValue read-only
public
mixed
$nextValue
$odd read-only
public
bool
$odd
$counter
private
int
$counter
= 0
Methods
__call()
public
__call(string $name, array<string|int, mixed> $args) : mixed
Parameters
- $name : string
- $args : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(string $name, array<string|int, mixed> $args) : mixed
Parameters
- $name : string
- $args : array<string|int, mixed>
Tags
__construct()
public
__construct(iterable<string|int, mixed>|stdClass $iterable) : mixed
Parameters
- $iterable : iterable<string|int, mixed>|stdClass
__get()
public
& __get(string $name) : mixed
Parameters
- $name : string
Tags
__isset()
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Tags
__unset()
public
__unset(string $name) : void
Parameters
- $name : string
Tags
count()
Returns the count of elements.
public
count() : int
Return values
intgetCounter()
Returns the counter.
public
getCounter() : int
Return values
intgetNextKey()
Returns the next key.
public
getNextKey() : mixed
getNextValue()
Returns the next element.
public
getNextValue() : mixed
isEmpty()
Is the iterator empty?
public
isEmpty() : bool
Return values
boolisEven()
Is the counter even?
public
isEven() : bool
Return values
boolisFirst()
Is the current element the first one?
public
isFirst([int|null $gridWidth = null ]) : bool
Parameters
- $gridWidth : int|null = null
Return values
boolisLast()
Is the current element the last one?
public
isLast([int|null $gridWidth = null ]) : bool
Parameters
- $gridWidth : int|null = null
Return values
boolisOdd()
Is the counter odd?
public
isOdd() : bool
Return values
boolnext()
Forwards to the next element.
public
next() : void
rewind()
Rewinds the Iterator.
public
rewind() : void