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

connect() public method

Fake the connection since service is called for every method.
public connect ( ) : boolean
return boolean
    public function connect()
    {
        if (!$this->_isConnected) {
            $this->_isConnected = true;
        }
        return $this->_isConnected;
    }

Usage Example

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