lithium\net\socket\Curl::close PHP Méthode

close() public méthode

Closes the curl connection.
public close ( ) : boolean
Résultat boolean True on closed connection
    public function close()
    {
        if (!is_resource($this->_resource)) {
            return true;
        }
        curl_close($this->_resource);
        if (is_resource($this->_resource)) {
            $this->close();
        }
        return true;
    }

Usage Example

Exemple #1
0
 public function testClose()
 {
     $stream = new Curl($this->_testConfig);
     $result = $stream->open();
     $this->assertTrue($result);
     $result = $stream->close();
     $this->assertTrue($result);
     $result = $stream->resource();
     $this->assertFalse(is_resource($result));
 }
All Usage Examples Of lithium\net\socket\Curl::close