}
 private function buildAdapter(AdapterInterface $adapter)
 {
     return $adapter->setFollowLinks($this->followLinks)->setDepths($this->depths)->setMode($this->mode)->setExclude($this->exclude)->setNames($this->names)->setNotNames($this->notNames)->setContains($this->contains)->setNotContains($this->notContains)->setSizes($this->sizes)->setDates($this->dates)->setFilters($this->filters)->setSort($this->sort)->setPath($this->paths)->setNotPath($this->notPaths)->ignoreUnreadableDirs($this->ignoreUnreadableDirs);
 /**
  * @param AdapterInterface $adapter
  * @param string|null      $message
  * @param \Exception|null  $previous
  */
 public function __construct(AdapterInterface $adapter, $message = null, \Exception $previous = null)
 {
     $this->adapter = $adapter;
     parent::__construct($message ?: 'Search failed with "' . $adapter->getName() . '" adapter.', $previous);
 }
Пример #3
0
 /**
  * Registers a finder engine implementation.
  *
  * @param AdapterInterface $adapter  An adapter instance
  * @param integer          $priority Highest is selected first
  *
  * @return Finder The current Finder instance
  */
 public function addAdapter(Adapter\AdapterInterface $adapter, $priority = 0)
 {
     $this->adapters[$adapter->getName()] = array('adapter' => $adapter, 'priority' => $priority);
     return $this->sortAdapters();
 }