/** * @param $rm * @param $graph */ public function __construct(Query $query) { $this->rm = $query->getRm(); $this->graph = $query->getResult(); if (!$this->graph instanceof Graph) { throw new UnexpectedTypeException('Attempting a EasyRdf\\Graph', $this->graph); } if (!$this->rm instanceof Manager) { throw new UnexpectedTypeException('Attempting a Conjecto\\Nemrod\\Manager', $this->rm); } }
/** * @param string $sparqlQuery * * @internal param string $dql * * @return Query */ public function createQuery($sparqlQuery = '') { $query = new Query($this); if (!empty($sparqlQuery)) { $query->setSparqlQuery($sparqlQuery); } return $query; }