public function EasyRdf_Resource::set

Set value for a property

The new value(s) will replace the existing values for the property. The name of the property should be a string. If you set a property to null or an empty array, then the property will be deleted.

Parameters

string $property The name of the property (e.g. foaf:name):

mixed $value The value for the property.:

Return value

integer The number of values added (1 or 0)

File

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

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

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