public function EasyRdf_Resource::toArray

Returns the properties of the resource as an associative array

For example: array('type' => 'uri', 'value' => 'http://www.example.com/')

Return value

array The properties of the resource

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Resource.php, line 199

Class

EasyRdf_Resource
Class that represents an RDF resource

Code

public function toArray() {
  if ($this
    ->isBnode()) {
    return array(
      'type' => 'bnode',
      'value' => $this->uri,
    );
  }
  else {
    return array(
      'type' => 'uri',
      'value' => $this->uri,
    );
  }
}