public function EasyRdf_Graph::deleteResource in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php \EasyRdf_Graph::deleteResource()
Delete a resource from a property of another resource
The resource can either be a resource or the URI of a resource.
Example: $graph->delete("http://example.com/bob", 'foaf:knows', 'http://example.com/alice');
Parameters
mixed $resource The resource to delete data from:
mixed $property The property name:
mixed $resource2 The resource value of the property to be deleted:
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Graph.php, line 1115
Class
- EasyRdf_Graph
- Container for collection of EasyRdf_Resources.
Code
public function deleteResource($resource, $property, $resource2) {
$this
->checkResourceParam($resource);
$this
->checkSinglePropertyParam($property, $inverse);
$this
->checkResourceParam($resource2);
return $this
->delete($resource, $property, array(
'type' => substr($resource2, 0, 2) == '_:' ? 'bnode' : 'uri',
'value' => $resource2,
));
}