DBIterator
in package
implements
Iterator
Iterator wrapper for adodb result objects
Tags
Table of Contents
Interfaces
- Iterator
Properties
- $empty : mixed
- If the result was empty
- $obj : mixed
- The result object of adodb
- $position : mixed
- The position in the rows
Methods
- __construct() : mixed
- Assign the object
- current() : array<string|int, mixed>
- Return the current object
- key() : int
- Return the current key
- next() : void
- Go to the next item
- rewind() : void
- Go back to first position
- valid() : bool
- Return if there are any items left
Properties
$empty
If the result was empty
private
mixed
$empty
(To prevent illegal object access)
$obj
The result object of adodb
private
mixed
$obj
$position
The position in the rows
private
mixed
$position
= 0
Mainly just to have something to return in the key() method.
Methods
__construct()
Assign the object
public
__construct(mixed $obj) : mixed
Parameters
- $obj : mixed
current()
Return the current object
public
current() : array<string|int, mixed>
Return values
array<string|int, mixed>key()
Return the current key
public
key() : int
Return values
intnext()
Go to the next item
public
next() : void
rewind()
Go back to first position
public
rewind() : void
valid()
Return if there are any items left
public
valid() : bool