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);
    }
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);
    }
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 ) ; }
Establish a connection to an http server

@throws \LogicException           when unable to connect to the socket
@throws MissingExtensionException when no curl extension
Establish a connection to an http server