当前位置: 首页>>代码示例>>PHP>>正文


PHP MDB2_Driver_Common::disconnect方法代码示例

本文整理汇总了PHP中MDB2_Driver_Common::disconnect方法的典型用法代码示例。如果您正苦于以下问题:PHP MDB2_Driver_Common::disconnect方法的具体用法?PHP MDB2_Driver_Common::disconnect怎么用?PHP MDB2_Driver_Common::disconnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MDB2_Driver_Common的用法示例。


在下文中一共展示了MDB2_Driver_Common::disconnect方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 public function tearDown()
 {
     if (!$this->db || MDB2::isError($this->db)) {
         return;
     }
     $this->clearTables();
     $this->db->disconnect();
     $this->db->popExpect();
     unset($this->db);
 }
开发者ID:gauthierm,项目名称:MDB2,代码行数:10,代码来源:Abstract.php

示例2: disconnect

 /**
  * @brief Disconnect
  * @return bool
  *
  * This is good bye, good bye, yeah!
  */
 public static function disconnect()
 {
     // Cut connection if required
     if (self::$connection) {
         if (self::$backend == self::BACKEND_MDB2) {
             self::$connection->disconnect();
         }
         self::$connection = false;
         self::$MDB2 = false;
         self::$PDO = false;
     }
     return true;
 }
开发者ID:ryanshoover,项目名称:core,代码行数:19,代码来源:db.php

示例3: disconnect

 /**
  * Log out and disconnect from the database.
  *
  * @param  boolean $force if the disconnect should be forced even if the
  *                        connection is opened persistently
  * @return mixed true on success, false if not connected and error
  *                object on error
  * @access public
  */
 function disconnect($force = true)
 {
     if (is_resource($this->connection)) {
         if ($this->in_transaction) {
             $dsn = $this->dsn;
             $database_name = $this->database_name;
             $persistent = $this->options['persistent'];
             $this->dsn = $this->connected_dsn;
             $this->database_name = $this->connected_database_name;
             $this->options['persistent'] = $this->opened_persistent;
             $this->rollback();
             $this->dsn = $dsn;
             $this->database_name = $database_name;
             $this->options['persistent'] = $persistent;
         }
         if (!$this->opened_persistent || $force) {
             @sqlite_close($this->connection);
         }
     }
     return parent::disconnect($force);
 }
开发者ID:ookwudili,项目名称:chisimba,代码行数:30,代码来源:sqlite.php

示例4: disconnect

 /**
  * Log out and disconnect from the database.
  *
  * @param  boolean $force if the disconnect should be forced even if the
  *                        connection is opened persistently
  * @return mixed true on success, false if not connected and error
  *                object on error
  * @access public
  */
 function disconnect($force = true)
 {
     if ($this->connection instanceof SQLite3) {
         if ($this->in_transaction) {
             $dsn = $this->dsn;
             $database_name = $this->database_name;
             $persistent = $this->options['persistent'];
             $this->dsn = $this->connected_dsn;
             $this->database_name = $this->connected_database_name;
             $this->options['persistent'] = $this->opened_persistent;
             $this->rollback();
             $this->dsn = $dsn;
             $this->database_name = $database_name;
             $this->options['persistent'] = $persistent;
         }
         if (!$this->opened_persistent || $force) {
             $this->connection->close();
         }
     } else {
         return false;
     }
     return parent::disconnect($force);
 }
开发者ID:jaeindia,项目名称:ownCloud-Enhancements,代码行数:32,代码来源:sqlite3.php

示例5: disconnect

 /**
  * Log out and disconnect from the database.
  *
  * @param  boolean $force if the disconnect should be forced even if the
  *                        connection is opened persistently
  * @return mixed true on success, false if not connected and error
  *                object on error
  * @access public
  */
 function disconnect($force = true)
 {
     if (is_resource($this->connection)) {
         if ($this->in_transaction) {
             $dsn = $this->dsn;
             $database_name = $this->database_name;
             $persistent = $this->options['persistent'];
             $this->dsn = $this->connected_dsn;
             $this->database_name = $this->connected_database_name;
             $this->options['persistent'] = $this->opened_persistent;
             $this->rollback();
             $this->dsn = $dsn;
             $this->database_name = $database_name;
             $this->options['persistent'] = $persistent;
         }
         if (!$this->opened_persistent || $force) {
             $ok = @pg_close($this->connection);
             if (!$ok) {
                 return $this->raiseError(MDB2_ERROR_DISCONNECT_FAILED, null, null, null, __FUNCTION__);
             }
         }
     } else {
         return false;
     }
     return parent::disconnect($force);
 }
开发者ID:phpontrax,项目名称:trax,代码行数:35,代码来源:pgsql.php

示例6: disconnect

 /**
  * Log out and disconnect from the database.
  *
  * @param  boolean $force if the disconnect should be forced even if the
  *                        connection is opened persistently
  * @return mixed true on success, false if not connected and error
  *                object on error
  * @access public
  */
 function disconnect($force = true)
 {
     if (is_resource($this->connection)) {
         if ($this->in_transaction) {
             $dsn = $this->dsn;
             $database_name = $this->database_name;
             $persistent = $this->options['persistent'];
             $this->dsn = $this->connected_dsn;
             $this->database_name = $this->connected_database_name;
             $this->options['persistent'] = $this->opened_persistent;
             $this->rollback();
             $this->dsn = $dsn;
             $this->database_name = $database_name;
             $this->options['persistent'] = $persistent;
         }
         if (!$this->opened_persistent || $force) {
             if (function_exists('oci_close')) {
                 @oci_close($this->connection);
             } else {
                 @OCILogOff($this->connection);
             }
         }
         $this->uncommitedqueries = 0;
     }
     return parent::disconnect($force);
 }
开发者ID:Rudi9719,项目名称:lucid,代码行数:35,代码来源:oci8.php

示例7: disconnect

 /**
  * Log out and disconnect from the database.
  *
  * @param  boolean $force if the disconnect should be forced even if the
  *                        connection is opened persistently
  * @return mixed true on success, false if not connected and error
  *                object on error
  * @access public
  */
 function disconnect($force = true)
 {
     if (is_resource($this->connection)) {
         if ($this->in_transaction) {
             $this->rollback();
         }
         if (!$this->opened_persistent || $force) {
             @mssql_close($this->connection);
         }
     }
     return parent::disconnect($force);
 }
开发者ID:laiello,项目名称:punchcms,代码行数:21,代码来源:mssql.php


注:本文中的MDB2_Driver_Common::disconnect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。