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


PHP Connection::disconnect方法代碼示例

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


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

示例1: testDisconnect

 public function testDisconnect()
 {
     $this->assertNull($this->connection->getHandle());
     $this->connection->query("SELECT DATE('now')");
     $this->assertTrue(($handle = $this->connection->getHandle()) instanceof \PDO, "After connect handle should be instance of PDO, but it is: " . get_class($handle));
     $this->connection->disconnect();
     $this->assertNull($this->connection->getHandle());
 }
開發者ID:renq,項目名稱:Simqel,代碼行數:8,代碼來源:PDOTest.php

示例2: testConnection

 public function testConnection()
 {
     $this->subject->disconnect();
     $result = $this->subject->connect();
     $this->assertTrue($result);
     // Try a reconnect
     $result = $this->subject->connect();
     $this->assertTrue($result);
     $result = $this->subject->isConnected();
     $this->assertTrue($result);
     $result = $this->subject->disconnect();
     $this->assertTrue($result);
     $result = $this->subject->isConnected();
     $this->assertFalse($result);
 }
開發者ID:samjarrett,項目名稱:beanstalk,代碼行數:15,代碼來源:ConnectTest.php

示例3: run

 public static function run()
 {
     Connection::connect();
     Session::start();
     Router::run();
     Connection::disconnect();
 }
開發者ID:albertomoreno,項目名稱:web-newspaper,代碼行數:7,代碼來源:App.php

示例4: testDisconnect

 public function testDisconnect()
 {
     $adapterConnection = $this->prophesize(AbstractConnection::class);
     $adapterConnection->close()->shouldBeCalled();
     $connection = new Connection($adapterConnection->reveal());
     $result = $connection->disconnect();
     static::assertInstanceOf(Connection::class, $result);
 }
開發者ID:thomasvargiu,項目名稱:amqpal,代碼行數:8,代碼來源:ConnectionTest.php

示例5: descargaApk

 function descargaApk($array)
 {
     try {
         if ($array != NULL) {
             $con = new Connection();
             $mysql = $con->connection();
             $this->sql = "SELECT\n\t\t\t\taplicativo.ubicacion\n\t\t\t\tFROM usuarios\n\t\t\t\tINNER JOIN permisos on permisos.idUsuario = usuarios.id\n\t\t\t\tINNER JOIN aplicativo on aplicativo.id = permisos.idAplicativo\n\t\t\t\twhere\n\t\t\t\tusuarios.id = " . $array['usu'] . "\n\t\t\t\tand\n\t\t\t\taplicativo.id = " . $array['app'] . "\n\t\t\t\tand permisos.estado = 0";
             $resultado = mysql_query($this->sql);
             $fila = mysql_fetch_array($resultado);
             $con->disconnect($mysql);
         } else {
             $fila = $array;
         }
     } catch (Exception $e) {
         echo 'Excepción capturada: ', $e->getMessage(), "\n";
     }
     return $fila;
 }
開發者ID:Sebastianch7,項目名稱:paginaWebAplicativosAndroid,代碼行數:18,代碼來源:Consult.php

示例6: disconnect

 function disconnect()
 {
     $this->mysql_connection->remove($this);
     parent::disconnect();
 }
開發者ID:giant-rabbit,項目名稱:mysql-concentrator,代碼行數:5,代碼來源:ClientConnection.php


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