import v2.0.0.0_RC3 | 2012-07-01

https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
2019-07-17 22:31:04 +02:00
parent 38c146901c
commit 2f397f01f7
2677 changed files with 296182 additions and 45159 deletions

View File

@ -17,7 +17,7 @@
* @subpackage Statement
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Db2.php 16541 2009-07-07 06:59:03Z bkarwin $
* @version $Id: Db2.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -35,10 +35,6 @@ require_once 'Zend/Db/Statement.php';
*/
class Zend_Db_Statement_Db2 extends Zend_Db_Statement
{
/**
* Statement resource handle.
*/
protected $_stmt = null;
/**
* Column names.
@ -158,7 +154,7 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
$error = db2_stmt_error();
if ($error === '') {
return false;
return false;
}
return $error;
@ -172,10 +168,10 @@ class Zend_Db_Statement_Db2 extends Zend_Db_Statement
*/
public function errorInfo()
{
$error = $this->errorCode();
if ($error === false){
return false;
}
$error = $this->errorCode();
if ($error === false){
return false;
}
/*
* Return three-valued array like PDO. But DB2 does not distinguish

View File

@ -17,7 +17,7 @@
* @subpackage Statement
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Exception.php 16541 2009-07-07 06:59:03Z bkarwin $
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -36,4 +36,38 @@ require_once 'Zend/Db/Exception.php';
*/
class Zend_Db_Statement_Exception extends Zend_Db_Exception
{
/**
* @var Exception
*/
protected $_chainedException = null;
/**
* @param string $message
* @param string|int $code
* @param Exception $chainedException
*/
public function __construct($message = null, $code = null, Exception $chainedException=null)
{
$this->message = $message;
$this->code = $code;
$this->_chainedException = $chainedException;
}
/**
* Check if this general exception has a specific database driver specific exception nested inside.
*
* @return bool
*/
public function hasChainedException()
{
return ($this->_chainedException!==null);
}
/**
* @return Exception|null
*/
public function getChainedException()
{
return $this->_chainedException;
}
}

View File

@ -17,7 +17,7 @@
* @subpackage Statement
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Mysqli.php 17693 2009-08-20 16:34:59Z jimbojsb $
* @version $Id: Mysqli.php 18951 2009-11-12 16:26:19Z alexander $
*/
@ -26,7 +26,7 @@
*/
require_once 'Zend/Db/Statement.php';
/**
* Extends for Mysqli
*
@ -39,13 +39,6 @@ require_once 'Zend/Db/Statement.php';
class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
{
/**
* The mysqli_stmt object.
*
* @var mysqli_stmt
*/
protected $_stmt;
/**
* Column names.
*
@ -282,12 +275,12 @@ class Zend_Db_Statement_Mysqli extends Zend_Db_Statement
// fetch the next result
$retval = $this->_stmt->fetch();
switch ($retval) {
case null: // end of data
case false: // error occurred
$this->_stmt->reset();
return $retval;
default:
// fallthrough
case null: // end of data
case false: // error occurred
$this->_stmt->reset();
return false;
default:
// fallthrough
}
// make sure we have a fetch mode

View File

@ -17,7 +17,7 @@
* @subpackage Statement
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Oracle.php 16541 2009-07-07 06:59:03Z bkarwin $
* @version $Id: Oracle.php 18636 2009-10-17 05:44:41Z ralph $
*/
/**
@ -37,11 +37,6 @@ require_once 'Zend/Db/Statement.php';
class Zend_Db_Statement_Oracle extends Zend_Db_Statement
{
/**
* The connection_stmt object.
*/
protected $_stmt;
/**
* Column names.
*/
@ -234,18 +229,11 @@ class Zend_Db_Statement_Oracle extends Zend_Db_Statement
public function _execute(array $params = null)
{
$connection = $this->_adapter->getConnection();
if (!$this->_stmt) {
return false;
}
if (! $this->_stmt) {
/**
* @see Zend_Db_Adapter_Oracle_Exception
*/
require_once 'Zend/Db/Statement/Oracle/Exception.php';
throw new Zend_Db_Statement_Oracle_Exception(oci_error($connection));
}
if ($params !== null) {
if (!is_array($params)) {
$params = array($params);

View File

@ -17,7 +17,7 @@
* @subpackage Statement
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Pdo.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Pdo.php 18951 2009-11-12 16:26:19Z alexander $
*/
/**
@ -40,13 +40,6 @@ require_once 'Zend/Db/Statement.php';
class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggregate
{
/**
* The statement object.
*
* @var PDOStatement
*/
protected $_stmt;
/**
* @var int
*/
@ -65,7 +58,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
$this->_stmt = $this->_adapter->getConnection()->prepare($sql);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -89,7 +82,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
}
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -121,7 +114,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->bindParam($parameter, $variable, $type, $length, $options);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -139,6 +132,9 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
if (is_string($parameter) && $parameter[0] != ':') {
$parameter = ":$parameter";
}
$this->_bindParam[$parameter] = $value;
try {
if ($type === null) {
return $this->_stmt->bindValue($parameter, $value);
@ -147,7 +143,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
}
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -163,7 +159,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->closeCursor();
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -180,7 +176,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->columnCount();
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -197,7 +193,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->errorCode();
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -214,7 +210,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->errorInfo();
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -235,7 +231,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
}
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -257,7 +253,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->fetch($style, $cursor, $offset);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -295,7 +291,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
}
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -312,7 +308,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->fetchColumn($col);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -330,7 +326,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->fetchObject($class, $config);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -347,7 +343,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->getAttribute($key);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -364,7 +360,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->getColumnMeta($column);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -382,7 +378,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->nextRowset();
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -400,7 +396,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->rowCount();
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -418,7 +414,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->setAttribute($key, $val);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}
@ -436,7 +432,7 @@ class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggrega
return $this->_stmt->setFetchMode($mode);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}

View File

@ -17,7 +17,7 @@
* @subpackage Statement
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Ibm.php 16971 2009-07-22 18:05:45Z mikaelkael $
* @version $Id: Ibm.php 17860 2009-08-27 22:48:48Z beberlei $
*/
/**
@ -87,7 +87,7 @@ class Zend_Db_Statement_Pdo_Ibm extends Zend_Db_Statement_Pdo
}
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
}
}

View File

@ -35,10 +35,6 @@ require_once 'Zend/Db/Statement.php';
*/
class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
{
/**
* The connection_stmt object.
*/
protected $_stmt;
/**
* The connection_stmt object original string.