ref Исправление типов
This commit is contained in:
parent
a09fc396d8
commit
28429039a4
8 changed files with 24 additions and 98 deletions
|
|
@ -5,6 +5,7 @@ namespace ctiso\Database;
|
|||
use ctiso\Database\StatementIterator,
|
||||
ctiso\Tools\StringUtil,
|
||||
PDO;
|
||||
use TheSeer\Tokenizer\Exception;
|
||||
|
||||
class PDOStatement extends \PDOStatement implements \IteratorAggregate
|
||||
{
|
||||
|
|
@ -12,7 +13,7 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
|
|||
public $cache = array();
|
||||
public $fields;
|
||||
|
||||
function getIterator(): Iterator {
|
||||
function getIterator(): \Iterator {
|
||||
return new StatementIterator($this);
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +74,7 @@ class PDOStatement extends \PDOStatement implements \IteratorAggregate
|
|||
|
||||
function getInt($name) {
|
||||
if (!$this->fields) {
|
||||
throw new Error('no fields');
|
||||
throw new \Exception('no fields');
|
||||
}
|
||||
return (int)$this->fields[$name];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue