Example #1
0
 /** Fetch a named graph from the graph store
  *
  * The URI can either be a full absolute URI or
  * a URI relative to the URI of the graph store.
  *
  * @param string $uriRef The URI of graph desired
  *
  * @return Graph The graph requested
  */
 public function get($uriRef)
 {
     if ($uriRef === self::DEFAULT_GRAPH) {
         $dataUrl = $this->urlForGraph(self::DEFAULT_GRAPH);
         $graph = new Graph();
     } else {
         $graphUri = $this->parsedUri->resolve($uriRef)->toString();
         $dataUrl = $this->urlForGraph($graphUri);
         $graph = new Graph($graphUri);
     }
     $graph->load($dataUrl);
     return $graph;
 }
Example #2
0
<?php

require_once '../inc/runtime.php';
$_options->linkmeta = false;
require_once '../wildcard/runtime.php';
if (isset($i_uri)) {
    $g = new Graph('memory', '', '');
    $g->load($i_uri);
}
require_once '../wildcard/GET.php';