public function EasyRdf_Resource::addLiteral

Add a literal value as a property of the resource

The value can either be a single value or an array of values.

Example: $resource->add('dc:title', 'Title of Page');

Parameters

mixed $property The property name:

mixed $values The value or values for the property:

string $lang The language of the literal:

Return value

integer The number of values added

File

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

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function addLiteral($property, $values, $lang = null) {
  $this
    ->checkHasGraph();
  return $this->graph
    ->addLiteral($this->uri, $property, $values, $lang);
}