public function sendSparqlUpdateQuery($url, $query)
    {
        // because you can't just fire multiple requests with the same CURL class instance
        // we have to be creative and re-create the class everytime a request is to be send.
        // FYI: https://github.com/php-curl-class/php-curl-class/issues/326
        $class = get_class($this->httpClient);
        $phpVersionToOld = version_compare(phpversion(), '5.5.11', '<=');
        // only reinstance the class if its not mocked
        if ($phpVersionToOld && false === strpos($class, 'Mockery')) {
            $this->httpClient = new $class;
        }

        // TODO extend Accept headers to further formats
        $this->httpClient->setHeader('Accept', 'application/sparql-results+json');
        $this->httpClient->setHeader('Content-Type', 'application/sparql-update');

        return $this->httpClient->get($url, array('query' => $query));
    }
public function sendSparqlUpdateQuery($url, $query)
    {
        // because you can't just fire multiple requests with the same CURL class instance
        // we have to be creative and re-create the class everytime a request is to be send.
        // FYI: https://github.com/php-curl-class/php-curl-class/issues/326
        $class = get_class($this->httpClient);
        $phpVersionToOld = version_compare(phpversion(), '5.5.11', '<=');
        // only reinstance the class if its not mocked
        if ($phpVersionToOld && false === strpos($class, 'Mockery')) {
            $this->httpClient = new $class;
        }

        // TODO extend Accept headers to further formats
        $this->httpClient->setHeader('Accept', 'application/sparql-results+json');
        $this->httpClient->setHeader('Content-Type', 'application/sparql-update');

        return $this->httpClient->get($url, array('query' => $query));
    }
public function sendSparqlUpdateQuery ( $ url , $ query ) { // because you can't just fire multiple requests with the same CURL class instance // we have to be creative and re-create the class everytime a request is to be send. // FYI: https://github.com/php-curl-class/php-curl-class/issues/326 $ class = get_class ( $ this -> httpClient ) ; $ phpVersionToOld = version_compare ( phpversion ( ) , '5.5.11' , '<=' ) ; // only reinstance the class if its not mocked if ( $ phpVersionToOld && false === strpos ( $ class , 'Mockery' ) ) { $ this -> httpClient = new $ class ; } // TODO extend Accept headers to further formats $ this -> httpClient -> setHeader ( 'Accept' , 'application/sparql-results+json' ) ; $ this -> httpClient -> setHeader ( 'Content-Type' , 'application/sparql-update' ) ; return $ this -> httpClient -> get ( $ url , array ( 'query' => $ query ) ) ; }
Sends a SPARQL update query to the server.

@param string $url
@param string $query
@return string Response of the GET request.
Sends a SPARQL update query to the server .