You are here

public function EasyRdf_Resource::add in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php \EasyRdf_Resource::add()

Add values to for a property of the resource

Example: $resource->add('prefix:property', 'value');

Parameters

mixed $property The property name:

mixed $value The value for the property:

Return value

integer The number of values added (1 or 0)

1 call to EasyRdf_Resource::add()
EasyRdf_Container::append in vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php
Append an item to the end of the container

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php, line 291

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

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