public function EasyRdf_Graph::getLiteral

Get a single literal value for a property of a resource

If multiple values are set for a property then the value returned may be arbitrary.

This method will return null if there is not literal value for the property.

Parameters

string $resource The URI of the resource (e.g. http://example.com/joe#me):

string|array $property The name of the property (e.g. foaf:name):

string $lang The language to filter by (e.g. en):

Return value

object EasyRdf_Literal Literal value associated with the property

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Graph.php, line 664

Class

EasyRdf_Graph
Container for collection of EasyRdf_Resources.

Code

public function getLiteral($resource, $property, $lang = null) {
  return $this
    ->get($resource, $property, 'literal', $lang);
}