You are here

public function EasyRdf_Resource::typeAsResource in Zircon Profile 8

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

Get a single type for a resource, as a resource.

The type will be returned as an EasyRdf_Resource. If the resource has multiple types then the type returned may be arbitrary. This method will return null if the resource has no type.

Return value

EasyRdf_Resource A type assocated with the resource.

File

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

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function typeAsResource() {
  $this
    ->checkHasGraph();
  return $this->graph
    ->typeAsResource($this->uri);
}