Changeset 1754
- Timestamp:
- 07/31/08 14:29:57 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
framework/trunk/src/main/php/net/stubbles/rdbms/pdo/stubDatabasePDOConnection.php
- Property svn:keywords set to Id
r1281 r1754 6 6 * @package stubbles 7 7 * @subpackage rdbms_pdo 8 * @version $Id$ 8 9 */ 9 10 stubClassLoader::load('net::stubbles::rdbms::stubDatabaseConnection', … … 81 82 protected function createPDO() 82 83 { 83 $this->pdo = new PDO($this->connectionData->getDSN(), 84 $this->connectionData->getUserName(), 85 $this->connectionData->getPassword(), 86 $this->connectionData->getDriverOptions() 87 ); 84 $driverOptions = $this->connectionData->getDriverOptions(); 85 if (count($driverOptions) === 0) { 86 $this->pdo = new PDO($this->connectionData->getDSN(), 87 $this->connectionData->getUserName(), 88 $this->connectionData->getPassword() 89 ); 90 } else { 91 $this->pdo = new PDO($this->connectionData->getDSN(), 92 $this->connectionData->getUserName(), 93 $this->connectionData->getPassword(), 94 $driverOptions 95 ); 96 } 88 97 } 89 98 … … 217 226 case PDO::FETCH_COLUMN: 218 227 if (isset($driverOptions['colNo']) == false) { 219 throw new stubDatabaseException('Fetch mode COLUMN requires driver option ŽcolNoŽ.');228 throw new stubDatabaseException('Fetch mode COLUMN requires driver option ᅵcolNoᅵ.'); 220 229 } 221 230 … … 225 234 case PDO::FETCH_INTO: 226 235 if (isset($driverOptions['object']) == false) { 227 throw new stubDatabaseException('Fetch mode INTO requires driver option ŽobjectŽ.');236 throw new stubDatabaseException('Fetch mode INTO requires driver option ᅵobjectᅵ.'); 228 237 } 229 238 … … 233 242 case PDO::FETCH_CLASS: 234 243 if (isset($driverOptions['classname']) == false) { 235 throw new stubDatabaseException('Fetch mode CLASS requires driver option ŽclassnameŽ.');244 throw new stubDatabaseException('Fetch mode CLASS requires driver option ᅵclassnameᅵ.'); 236 245 } 237 246 framework/trunk/src/test/php/net/stubbles/rdbms/pdo/stubDatabasePDOConnectionTestCase.php
- Property svn:keywords set to Id
r1703 r1754 6 6 * @package stubbles 7 7 * @subpackage rdbms_test 8 * @version $Id$ 8 9 */ 9 10 stubClassLoader::load('net::stubbles::rdbms::pdo::stubDatabasePDOConnection'); 10 11 if (extension_loaded('pdo') == true) { 12 /** 13 * Helper class for the test. 14 * 15 * @package stubbles 16 * @subpackage rdbms_test 17 */ 11 18 class TestPDOStatement extends PDOStatement {} 12 19 } 20 /** 21 * Helper class for the test. 22 * 23 * @package stubbles 24 * @subpackage rdbms_test 25 */ 13 26 class TeststubDatabasePDOConnection extends stubDatabasePDOConnection 14 27 {
