public function EasyRdf_Resource::addResource

Add a resource as a property of the resource

Example: $bob->add('foaf:knows', 'http://example.com/alice');

Parameters

mixed $property The property name:

mixed $resource2 The resource to be the value of the property:

Return value

integer The number of values added (1 or 0)

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php, line 309

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function addResource($property, $resource2) {
  $this
    ->checkHasGraph();
  return $this->graph
    ->addResource($this->uri, $property, $resource2);
}