public function EasyRdf_Resource::addLiteral in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php \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
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Resource.php, line 309
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);
}