protected function EasyRdf_Graph::arrayToObject

Get an EasyRdf_Resource or EasyRdf_Literal object from an associative array. @ignore

2 calls to EasyRdf_Graph::arrayToObject()

File

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

Class

EasyRdf_Graph
Container for collection of EasyRdf_Resources.

Code

protected function arrayToObject($data) {
  if ($data) {
    if ($data['type'] == 'uri' or $data['type'] == 'bnode') {
      return $this
        ->resource($data['value']);
    }
    else {
      return EasyRdf_Literal::create($data);
    }
  }
  else {
    return null;
  }
}