Delete a graph from the graph store
The URI can either be a full absolute URI or a URI relative to the URI of the graph store.
string $uriRef The URI of graph to be added to:
object EasyRdf_Http_Response The response from the graph store
public function delete($uriRef) {
$graphUri = $this->parsedUri
->resolve($uriRef)
->toString();
$dataUrl = $this
->urlForGraph($graphUri);
$client = EasyRdf_Http::getDefaultHttpClient();
$client
->resetParameters(true);
$client
->setUri($dataUrl);
$client
->setMethod('DELETE');
$response = $client
->request();
if (!$response
->isSuccessful()) {
throw new EasyRdf_Exception("HTTP request to delete {$dataUrl} failed: " . $response
->getMessage());
}
return $response;
}