lithium\data\source\Http::disconnect PHP Method

disconnect() public method

Disconnect from socket.
public disconnect ( ) : boolean
return boolean
    public function disconnect()
    {
        if ($this->_isConnected && $this->connection !== null) {
            $this->_isConnected = false;
        }
        return !$this->_isConnected;
    }

Usage Example

Beispiel #1
0
 public function testDisconnect()
 {
     $http = new Http($this->_testConfig);
     $result = $http->connect();
     $this->assertTrue($result);
     $result = $http->disconnect();
     $this->assertTrue($result);
 }