You are here

public function EasyRdf_Graph::primaryTopic in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php \EasyRdf_Graph::primaryTopic()

Get the primary topic of the graph

Return value

EasyRdf_Resource The primary topic of the document.

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php, line 1554

Class

EasyRdf_Graph
Container for collection of EasyRdf_Resources.

Code

public function primaryTopic($resource = null) {
  $this
    ->checkResourceParam($resource, true);
  if ($resource) {
    return $this
      ->get($resource, 'foaf:primaryTopic|^foaf:isPrimaryTopicOf', 'resource');
  }
  else {
    return null;
  }
}