import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -37,11 +37,11 @@ require_once 'Zend/Db/Statement.php';
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Db_Statement_Pdo extends Zend_Db_Statement
class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggregate
{
/**
* The mysqli_stmt object.
* The statement object.
*
* @var PDOStatement
*/
@ -82,7 +82,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement
public function bindColumn($column, &$param, $type = null)
{
try {
if (is_null($type)) {
if ($type === null) {
return $this->_stmt->bindColumn($column, $param);
} else {
return $this->_stmt->bindColumn($column, $param, $type);
@ -110,7 +110,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement
if ($type === null) {
if (is_bool($variable)) {
$type = PDO::PARAM_BOOL;
} elseif (is_null($variable)) {
} elseif ($variable === null) {
$type = PDO::PARAM_NULL;
} elseif (is_integer($variable)) {
$type = PDO::PARAM_INT;
@ -140,7 +140,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement
$parameter = ":$parameter";
}
try {
if (is_null($type)) {
if ($type === null) {
return $this->_stmt->bindValue($parameter, $value);
} else {
return $this->_stmt->bindValue($parameter, $value, $type);
@ -261,6 +261,16 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement
}
}
/**
* Required by IteratorAggregate interface
*
* @return IteratorIterator
*/
public function getIterator()
{
return new IteratorIterator($this->_stmt);
}
/**
* Returns an array containing all of the result set rows.
*