public function EasyRdf_Resource::setType

Change the rdf:type property for the resource

Note that the PHP class of the resource will not change.

Parameters

string $type The new type (e.g. foaf:Person):

Return value

integer The number of types added

File

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

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function setType($type) {
  $this
    ->checkHasGraph();
  return $this->graph
    ->setType($this->uri, $type);
}