Curl\Curl::close PHP Method

close() public method

Close
public close ( )
    public function close()
    {
        if (is_resource($this->curl)) {
            curl_close($this->curl);
        }
        $this->options = null;
        $this->jsonDecoder = null;
        $this->xmlDecoder = null;
        $this->defaultDecoder = null;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Execute a request against the url.
  *
  * @param string $url
  * @param array  $params
  *
  * @return mixed
  */
 public function request($url, array $params = [])
 {
     $this->curl->get($url, $params);
     $this->curl->setOpt(CURLOPT_RETURNTRANSFER, true);
     $response = $this->curl->response;
     $this->curl->close();
     return $response;
 }
All Usage Examples Of Curl\Curl::close