当前位置: 首页>>代码示例>>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;未经允许,请勿转载。