diff options
Diffstat (limited to 'libs/Zend/Db/Adapter/Pdo/Abstract.php')
-rw-r--r-- | libs/Zend/Db/Adapter/Pdo/Abstract.php | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/libs/Zend/Db/Adapter/Pdo/Abstract.php b/libs/Zend/Db/Adapter/Pdo/Abstract.php index 9d05f417b4..0ffc1f428f 100644 --- a/libs/Zend/Db/Adapter/Pdo/Abstract.php +++ b/libs/Zend/Db/Adapter/Pdo/Abstract.php @@ -15,22 +15,22 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Abstract.php 17860 2009-08-27 22:48:48Z beberlei $ + * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * @see Zend_Db_Adapter_Abstract */ -require_once 'Zend/Db/Adapter/Abstract.php'; +// require_once 'Zend/Db/Adapter/Abstract.php'; /** * @see Zend_Db_Statement_Pdo */ -require_once 'Zend/Db/Statement/Pdo.php'; +// require_once 'Zend/Db/Statement/Pdo.php'; /** @@ -39,7 +39,7 @@ require_once 'Zend/Db/Statement/Pdo.php'; * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract @@ -99,7 +99,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract /** * @see Zend_Db_Adapter_Exception */ - require_once 'Zend/Db/Adapter/Exception.php'; + // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception('The PDO extension is required for this adapter but the extension is not loaded'); } @@ -108,7 +108,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract /** * @see Zend_Db_Adapter_Exception */ - require_once 'Zend/Db/Adapter/Exception.php'; + // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception('The ' . $this->_pdoType . ' driver is not currently installed'); } @@ -119,7 +119,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract if (isset($this->_config['persistent']) && ($this->_config['persistent'] == true)) { $this->_config['driver_options'][PDO::ATTR_PERSISTENT] = true; } - + try { $this->_connection = new PDO( $dsn, @@ -140,8 +140,8 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract /** * @see Zend_Db_Adapter_Exception */ - require_once 'Zend/Db/Adapter/Exception.php'; - throw new Zend_Db_Adapter_Exception($e->getMessage(), $e); + // require_once 'Zend/Db/Adapter/Exception.php'; + throw new Zend_Db_Adapter_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -177,10 +177,10 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract { $this->_connect(); $stmtClass = $this->_defaultStmtClass; - if (!class_exists($stmtClass)) { - require_once 'Zend/Loader.php'; - Zend_Loader::loadClass($stmtClass); - } + // if (!class_exists($stmtClass)) { + // require_once 'Zend/Loader.php'; + // Zend_Loader::loadClass($stmtClass); + // } $stmt = new $stmtClass($this, $sql); $stmt->setFetchMode($this->_fetchMode); return $stmt; @@ -240,7 +240,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract /** * @see Zend_Db_Statement_Exception */ - require_once 'Zend/Db/Statement/Exception.php'; + // require_once 'Zend/Db/Statement/Exception.php'; throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -258,26 +258,26 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract if ($sql instanceof Zend_Db_Select) { $sql = $sql->assemble(); } - + try { $affected = $this->getConnection()->exec($sql); - + if ($affected === false) { $errorInfo = $this->getConnection()->errorInfo(); /** * @see Zend_Db_Adapter_Exception */ - require_once 'Zend/Db/Adapter/Exception.php'; + // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception($errorInfo[2]); } - + return $affected; } catch (PDOException $e) { /** * @see Zend_Db_Adapter_Exception */ - require_once 'Zend/Db/Adapter/Exception.php'; - throw new Zend_Db_Adapter_Exception($e->getMessage(), $e); + // require_once 'Zend/Db/Adapter/Exception.php'; + throw new Zend_Db_Adapter_Exception($e->getMessage(), $e->getCode(), $e); } } @@ -338,7 +338,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract /** * @see Zend_Db_Adapter_Exception */ - require_once 'Zend/Db/Adapter/Exception.php'; + // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception('The PDO extension is required for this adapter but the extension is not loaded'); } switch ($mode) { @@ -354,7 +354,7 @@ abstract class Zend_Db_Adapter_Pdo_Abstract extends Zend_Db_Adapter_Abstract /** * @see Zend_Db_Adapter_Exception */ - require_once 'Zend/Db/Adapter/Exception.php'; + // require_once 'Zend/Db/Adapter/Exception.php'; throw new Zend_Db_Adapter_Exception("Invalid fetch mode '$mode' specified"); break; } |