Merge branch 'master' into noglob

This commit is contained in:
origami11@yandex.ru 2022-11-18 16:07:32 +03:00
commit 7d35a8f3f0
27 changed files with 430 additions and 288 deletions

View file

@ -12,7 +12,7 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
public $cache = array();
public $fields;
function getIterator() {
function getIterator(): Iterator {
return new StatementIterator($this);
}
@ -72,6 +72,9 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
}
function getInt($name) {
if (!$this->fields) {
throw new Error('no fields');
}
return (int)$this->fields[$name];
}
@ -80,7 +83,7 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
}
function getString($name) {
return $this->fields[$name];
return isset($this->fields[$name]) ? $this->fields[$name]: null;
}
function getBoolean($name) {
@ -98,4 +101,10 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
function getRecordCount() {
return count($this->cache);
}
function execute($args = null) {
$result = parent::execute($args);
return $result;
}
}