You are here

public function EasyRdf_Sparql_Client::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php \EasyRdf_Sparql_Client::__construct()

Create a new SPARQL endpoint client

If the query and update endpoints are the same, then you only need to give a single URI.

Parameters

string $queryUri The address of the SPARQL Query Endpoint:

string $updateUri Optional address of the SPARQL Update Endpoint:

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php, line 63

Class

EasyRdf_Sparql_Client
Class for making SPARQL queries using the SPARQL 1.1 Protocol

Code

public function __construct($queryUri, $updateUri = null) {
  $this->queryUri = $queryUri;
  if (strlen(parse_url($queryUri, PHP_URL_QUERY)) > 0) {
    $this->queryUri_has_params = true;
  }
  else {
    $this->queryUri_has_params = false;
  }
  if ($updateUri) {
    $this->updateUri = $updateUri;
  }
  else {
    $this->updateUri = $queryUri;
  }
}