adapterFactory = $adapterFactory; } /** * {@inheritdoc} */ public function search(RequestInterface $request) { return $this->getConnection()->query($request); } /** * Get adapter * * @return AdapterInterface */ protected function getConnection() { if ($this->adapter === null) { $this->adapter = $this->adapterFactory->create(); } return $this->adapter; } }