You are here

public function EasyRdf_Sparql_Client::clear 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::clear()

File

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

Class

EasyRdf_Sparql_Client
Class for making SPARQL queries using the SPARQL 1.1 Protocol

Code

public function clear($graphUri, $silent = false) {
  $query = "CLEAR";
  if ($silent) {
    $query .= " SILENT";
  }
  if (preg_match('/^all|named|default$/i', $graphUri)) {
    $query .= " {$graphUri}";
  }
  else {
    $query .= " GRAPH <{$graphUri}>";
  }
  return $this
    ->update($query);
}