original_string: protected function connectHttp(): void
      {
          if (!extension_loaded('curl')) {
              throw new MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler');
          }
  
          $this->httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put');
  
          if (!$this->httpConnection) {
              throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port);
          }
  
          curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST");
          curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true);
      }
code: protected function connectHttp(): void
      {
          if (!extension_loaded('curl')) {
              throw new MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler');
          }
  
          $this->httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put');
  
          if (!$this->httpConnection) {
              throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port);
          }
  
          curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST");
          curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true);
      }
code_tokens: protected function connectHttp ( ) : void { if ( ! extension_loaded ( 'curl' ) ) { throw new MissingExtensionException ( 'The curl extension is required to use http URLs with the CubeHandler' ) ; } $ this -> httpConnection = curl_init ( 'http://' . $ this -> host . ':' . $ this -> port . '/1.0/event/put' ) ; if ( ! $ this -> httpConnection ) { throw new \ LogicException ( 'Unable to connect to ' . $ this -> host . ':' . $ this -> port ) ; } curl_setopt ( $ this -> httpConnection , CURLOPT_CUSTOMREQUEST , "POST" ) ; curl_setopt ( $ this -> httpConnection , CURLOPT_RETURNTRANSFER , true ) ; }
docstring: Establish a connection to an http server
  
  @throws \LogicException           when unable to connect to the socket
  @throws MissingExtensionException when no curl extension
docstring_tokens: Establish a connection to an http server