/** * Constructor. * * @param NodeFactory $nodeFactory * @param StatementFactory $statementFactory * @param QueryFactory $queryFactory * @param ResultFactory $resultFactory * @param StatementIteratorFactory $statementIteratorFactory * @param array $configuration Array containing database credentials * @throws \Exception If HTTP store requires the PHP ODBC extension to be loaded. */ public function __construct(NodeFactory $nodeFactory, StatementFactory $statementFactory, QueryFactory $queryFactory, ResultFactory $resultFactory, StatementIteratorFactory $statementIteratorFactory, array $configuration) { $this->configuration = $configuration; $this->checkRequirements(); // Open connection and, if possible, authenticate on server $this->openConnection(); $this->nodeFactory = $nodeFactory; $this->statementFactory = $statementFactory; $this->queryFactory = $queryFactory; $this->resultFactory = $resultFactory; $this->statementIteratorFactory = $statementIteratorFactory; parent::__construct($nodeFactory, $statementFactory, $queryFactory, $resultFactory, $statementIteratorFactory); }
/** * Constructor. * * @param NodeFactory $nodeFactory * @param StatementFactory $statementFactory * @param QueryFactory $queryFactory * @param ResultFactory $resultFactory * @param StatementIteratorFactory $statementIteratorFactory * @param array $configuration Array containing database credentials */ public function __construct(NodeFactory $nodeFactory, StatementFactory $statementFactory, QueryFactory $queryFactory, ResultFactory $resultFactory, StatementIteratorFactory $statementIteratorFactory, array $configuration) { $this->configuration = $configuration; // Open connection $this->openConnection(); // Check if the store is setup. If not, create missing MySQL tables. if (!$this->store->isSetUp()) { $this->store->setUp(); } $this->nodeFactory = $nodeFactory; $this->statementFactory = $statementFactory; $this->queryFactory = $queryFactory; $this->resultFactory = $resultFactory; $this->statementIteratorFactory = $statementIteratorFactory; parent::__construct($nodeFactory, $statementFactory, $queryFactory, $resultFactory, $statementIteratorFactory); }
/** * Removes all statements from a (default-) graph which match with given statement. * * @param Statement $statement It can be either a concrete or pattern-statement. * @param Node $graph optional Overrides target graph. If set, all statements will * be delete in that graph. * @param array $options optional Key-value pairs which provide additional introductions * for the store and/or its adapter(s). */ public function deleteMatchingStatements(Statement $statement, Node $graph = null, array $options = array()) { // given $graph forces usage of it and not the graph from the statement instance if (null == $graph && null == $statement->getGraph()) { throw new \Exception('Virtuoso is a quad store and therefore needs to know the graph to delete statements.'); } parent::deleteMatchingStatements($statement, $graph, $options); }