Add a resource as a property of another resource
The resource can either be a resource or the URI of a resource.
Example: $graph->add("http://example.com/bob", 'foaf:knows', 'http://example.com/alice');
mixed $resource The resource to add data to:
mixed $property The property name:
mixed $resource2 The resource to be value of the property:
integer The number of values added
public function addResource($resource, $property, $resource2) {
$this
->checkResourceParam($resource);
$this
->checkSinglePropertyParam($property, $inverse);
$this
->checkResourceParam($resource2);
return $this
->add($resource, $property, array(
'type' => substr($resource2, 0, 2) == '_:' ? 'bnode' : 'uri',
'value' => $resource2,
));
}