Beispiel #1
0
 /**
  * @param ConnectionManagement|string $dbname Name of file without '_db' and extention '.xml'.
  */
 public function __construct($dbname)
 {
     // Create the object ConnectionManagement
     if (is_string($dbname)) {
         $this->_connectionManagement = new ConnectionManagement($dbname);
     } elseif ($dbname instanceof ConnectionManagement) {
         $this->_connectionManagement = $dbname;
     }
     // Create the proper driver
     if ($this->_connectionManagement->getDriver() == "sqlrelay") {
         $this->_dbDriver = new DBSQLRelayDriver($this->_connectionManagement);
     } elseif ($this->_connectionManagement->getDriver() == "oci8") {
         $this->_dbDriver = new DBOci8Driver($this->_connectionManagement);
     } else {
         $this->_dbDriver = DBPDODriver::factory($this->_connectionManagement);
     }
 }
Beispiel #2
0
 public function __construct(ConnectionManagement $connMngt)
 {
     $preOptions = [PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"];
     $postOptions = [PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, PDO::ATTR_EMULATE_PREPARES => true];
     parent::__construct($connMngt, null, $preOptions, $postOptions);
 }
Beispiel #3
0
 public function __construct(ConnectionManagement $connMngt)
 {
     parent::__construct($connMngt, null, [], []);
 }
Beispiel #4
0
 public function __construct(ConnectionManagement $connMngt)
 {
     $strcnn = $connMngt->getDriver() . ":" . $connMngt->getServer();
     parent::__construct($connMngt, $strcnn, [], []);
 }
Beispiel #5
0
 public function __construct(ConnectionManagement $connMngt)
 {
     $strcnn = $connMngt->getDbConnectionString();
     $postOptions = [PDO::ATTR_EMULATE_PREPARES => true];
     parent::__construct($connMngt, $strcnn, [], $postOptions);
 }