/**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * 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();
 }
Exemplo n.º 3
0
 public function _callbackTestAdaptersOrdering(ehough_finder_adapter_AdapterInterface $adapter)
 {
     return $adapter->getName();
 }