GraphAware\Reco4PHP\Persistence\DatabaseService::getDriver PHP Method

getDriver() public method

public getDriver ( )
    public function getDriver()
    {
        return $this->driver;
    }

Usage Example

 /**
  * @param \GraphAware\Common\Type\NodeInterface $input
  * @param \GraphAware\Reco4PHP\Engine\DiscoveryEngine[] $engines
  *
  * @return \GraphAware\Common\Result\ResultCollection
  */
 public function processDiscovery(NodeInterface $input, array $engines)
 {
     $stack = $this->databaseService->getDriver()->stack();
     foreach ($engines as $engine) {
         $statement = $engine->discoveryQuery($input);
         $stack->push($statement->text(), $statement->parameters(), $engine->name());
     }
     try {
         $resultCollection = $this->databaseService->getDriver()->runStack($stack);
         return $resultCollection;
     } catch (\Exception $e) {
         throw new \RuntimeException($e->getMessage());
     }
 }
All Usage Examples Of GraphAware\Reco4PHP\Persistence\DatabaseService::getDriver