public function postProcessors() : array;
public function execute(NodeInterface $input, Recommendations $recommendations, RecommendationEngine $recommendationEngine) { $this->stack = $this->databaseService->getDriver()->stack('post_process_' . $recommendationEngine->name()); foreach ($recommendationEngine->postProcessors() as $postProcessor) { if ($postProcessor instanceof CypherAwarePostProcessor) { foreach ($recommendations->getItems() as $recommendation) { $this->prepareQuery($input, $recommendation, $postProcessor); } } } try { $results = $this->databaseService->getDriver()->runStack($this->stack); $this->stack = null; return $results; } catch (\Exception $e) { throw new \RuntimeException('PostProcess Query Exception - ' . $e->getMessage()); } }