new Совместимость с php8

This commit is contained in:
origami11@yandex.ru 2023-04-19 11:25:28 +03:00
parent 2edd65d145
commit 5748ea9148
7 changed files with 17 additions and 30 deletions

View file

@ -16,26 +16,26 @@ class StatementIterator implements \Iterator
$this->row_count = $rs->getRecordCount();
}
function rewind() {
function rewind(): void{
$this->pos = 0;
}
function valid() {
function valid(): bool {
return ($this->pos < $this->row_count);
}
function key() {
function key(): mixed {
return $this->pos;
}
function current() {
function current(): mixed{
if (!isset($this->result->cache[$this->pos])) {
$this->result->cache[$this->pos] = $this->result->fetch(PDO::FETCH_ASSOC);
}
return $this->result->cache[$this->pos];
}
function next() {
function next(): void{
$this->pos++;
}