public static function EasyRdf_Graph::newAndLoad

Create a new graph and load RDF data from a URI into it

This static function is shorthand for: $graph = new EasyRdf_Graph($uri); $graph->load($uri, $format);

The document type is optional but should be specified if it can't be guessed or got from the HTTP headers.

Parameters

string $uri The URI of the data to load:

string $format Optional format of the data (eg. rdfxml):

Return value

object EasyRdf_Graph The new the graph object

File

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

Class

EasyRdf_Graph
Container for collection of EasyRdf_Resources.

Code

public static function newAndLoad($uri, $format = null) {
  $graph = new self($uri);
  $graph
    ->load($uri, $format);
  return $graph;
}