You are here

public function EasyRdf_Resource::label in Zircon Profile 8

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

Get a human readable label for this resource

This method will check a number of properties for the resource (in the order: skos:prefLabel, rdfs:label, foaf:name, dc:title) and return an approriate first that is available. If no label is available then it will return null.

Return value

string A label for the resource.

File

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

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function label($lang = null) {
  $this
    ->checkHasGraph();
  return $this->graph
    ->label($this->uri, $lang);
}