當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Creole::getDriver方法代碼示例

本文整理匯總了PHP中Creole::getDriver方法的典型用法代碼示例。如果您正苦於以下問題:PHP Creole::getDriver方法的具體用法?PHP Creole::getDriver怎麽用?PHP Creole::getDriver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Creole的用法示例。


在下文中一共展示了Creole::getDriver方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: connect

 /**
  * connect()
  */
 public function connect($dsninfo, $flags = 0)
 {
     if (!($driver = Creole::getDriver($dsninfo['phptype']))) {
         throw new SQLException("No driver has been registered to handle connection type: {$type}");
     }
     $connectionClass = Creole::import($driver);
     $this->childConnection = new $connectionClass();
     $this->log("connect(): DSN: " . var_export($dsninfo, true) . ", FLAGS: " . var_export($flags, true));
     return $this->childConnection->connect($dsninfo, $flags);
 }
開發者ID:rodrigoprestesmachado,項目名稱:whiteboard,代碼行數:13,代碼來源:DebugConnection.php

示例2: connect

 /**
  * @see Connection::connect()
  */
 function connect($dsninfo, $flags = 0)
 {
     $class = Creole::getDriver($dsninfo['phptype']);
     $class = Creole::import($class);
     $this->driver = new $class();
 }
開發者ID:BackupTheBerlios,項目名稱:php5cms-svn,代碼行數:9,代碼來源:MyCatchallConnection.php

示例3: connect

 /**
  * connect()
  */
 public function connect($dsninfo, $flags = 0)
 {
     if (!($driver = Creole::getDriver($dsninfo['phptype']))) {
         throw new SQLException("No driver has been registered to handle connection type: {$type}");
     }
     global $_DBArray;
     if (!isset($_DBArray) && isset($_SESSION['_DBArray'])) {
         //throw new SQLException("No Database Array defined for this connection but exists in session");
         //Added by JHL to avoid errors trying to execute query of a dbarray on June 25, 2011
         $_DBArray = $_SESSION['_DBArray'];
     }
     if (!isset($_DBArray)) {
         throw new SQLException("No Database Array defined for this connection");
     }
     $this->_DBArray = $_DBArray;
     return true;
 }
開發者ID:emildev35,項目名稱:processmaker,代碼行數:20,代碼來源:DBArrayConnection.php


注:本文中的Creole::getDriver方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。