You are here

protected function EasyRdf_Sparql_Client::updateData 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::updateData()

File

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

Class

EasyRdf_Sparql_Client
Class for making SPARQL queries using the SPARQL 1.1 Protocol

Code

protected function updateData($operation, $data, $graphUri = null) {
  $query = "{$operation} DATA {";
  if ($graphUri) {
    $query .= "GRAPH <{$graphUri}> {";
  }
  $query .= $this
    ->convertToTriples($data);
  if ($graphUri) {
    $query .= "}";
  }
  $query .= '}';
  return $this
    ->update($query);
}