/** * @param ehough_finder_adapter_AdapterInterface $adapter * @param string|null $message * @param Exception|null $previous */ public function __construct(ehough_finder_adapter_AdapterInterface $adapter, $message = null, Exception $previous = null) { $this->adapter = $adapter; parent::__construct($message ? $message : 'Search failed with "' . $adapter->getName() . '" adapter.', $previous); }
/** * Registers a finder engine implementation. * * @param ehough_finder_adapter_AdapterInterface $adapter An adapter instance * @param integer $priority Highest is selected first * * @return ehough_finder_Finder The current ehough_finder_Finder instance */ public function addAdapter(ehough_finder_adapter_AdapterInterface $adapter, $priority = 0) { $this->adapters[$adapter->getName()] = array('adapter' => $adapter, 'priority' => $priority, 'selected' => false); return $this->sortAdapters(); }
public function _callbackTestAdaptersOrdering(ehough_finder_adapter_AdapterInterface $adapter) { return $adapter->getName(); }