ResultIterator implements Iterator
Table of Contents
Interfaces
- Iterator
Methods
- __construct() : mixed
- ResultIterator constructor.
- current() : mixed
- Return the current element
- key() : mixed
- Return the key of the current element
- next() : void
- Move forward to next element
- rewind() : void
- Rewind the Iterator to the first element
- valid() : bool
- Checks if current position is valid
Methods
__construct()
ResultIterator constructor.
public
__construct(Result $result) : mixed
Parameters
- $result : Result
current()
Return the current element
public
current() : mixed
Tags
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —Can return any type.
key()
Return the key of the current element
public
key() : mixed
Tags
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —scalar on success, or null on failure.
next()
Move forward to next element
public
next() : void
Tags
Return values
void —Any returned value is ignored.
rewind()
Rewind the Iterator to the first element
public
rewind() : void
Tags
valid()
Checks if current position is valid
public
valid() : bool
Tags
Return values
bool —The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.