You are here

public function EasyRdf_Resource::get in Zircon Profile 8

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

Get a single value for a property

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

If $property is an array, then the first item in the array that matches a property that exists is returned.

This method will return null if the property does not exist.

Parameters

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

string $type The type of value to filter by (e.g. literal or resource):

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

Return value

mixed A value associated with the property

4 calls to EasyRdf_Resource::get()
EasyRdf_Collection::current in vendor/easyrdf/easyrdf/lib/EasyRdf/Collection.php
Return the current item in the collection
EasyRdf_Collection::next in vendor/easyrdf/easyrdf/lib/EasyRdf/Collection.php
Move forward to next item in the collection
EasyRdf_Container::current in vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php
Return the current item in the container
EasyRdf_Container::offsetGet in vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php
Array Access: get an item at a specified position in container using array syntax

File

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

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

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