X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Ffinder%2FAdapter%2FAbstractAdapter.php;fp=vendor%2Fsymfony%2Ffinder%2FAdapter%2FAbstractAdapter.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=1a1647c31734b21d71d6cf4ac79fee008d6ef449;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/symfony/finder/Adapter/AbstractAdapter.php b/vendor/symfony/finder/Adapter/AbstractAdapter.php deleted file mode 100644 index 1a1647c31..000000000 --- a/vendor/symfony/finder/Adapter/AbstractAdapter.php +++ /dev/null @@ -1,240 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Adapter; - -@trigger_error('The '.__NAMESPACE__.'\AbstractAdapter class is deprecated since Symfony 2.8 and will be removed in 3.0. Use directly the Finder class instead.', E_USER_DEPRECATED); - -/** - * Interface for finder engine implementations. - * - * @author Jean-François Simon - * - * @deprecated since 2.8, to be removed in 3.0. Use Finder instead. - */ -abstract class AbstractAdapter implements AdapterInterface -{ - protected $followLinks = false; - protected $mode = 0; - protected $minDepth = 0; - protected $maxDepth = PHP_INT_MAX; - protected $exclude = array(); - protected $names = array(); - protected $notNames = array(); - protected $contains = array(); - protected $notContains = array(); - protected $sizes = array(); - protected $dates = array(); - protected $filters = array(); - protected $sort = false; - protected $paths = array(); - protected $notPaths = array(); - protected $ignoreUnreadableDirs = false; - - private static $areSupported = array(); - - /** - * {@inheritdoc} - */ - public function isSupported() - { - $name = $this->getName(); - - if (!array_key_exists($name, self::$areSupported)) { - self::$areSupported[$name] = $this->canBeUsed(); - } - - return self::$areSupported[$name]; - } - - /** - * {@inheritdoc} - */ - public function setFollowLinks($followLinks) - { - $this->followLinks = $followLinks; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setMode($mode) - { - $this->mode = $mode; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDepths(array $depths) - { - $this->minDepth = 0; - $this->maxDepth = PHP_INT_MAX; - - foreach ($depths as $comparator) { - switch ($comparator->getOperator()) { - case '>': - $this->minDepth = $comparator->getTarget() + 1; - break; - case '>=': - $this->minDepth = $comparator->getTarget(); - break; - case '<': - $this->maxDepth = $comparator->getTarget() - 1; - break; - case '<=': - $this->maxDepth = $comparator->getTarget(); - break; - default: - $this->minDepth = $this->maxDepth = $comparator->getTarget(); - } - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setExclude(array $exclude) - { - $this->exclude = $exclude; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setNames(array $names) - { - $this->names = $names; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setNotNames(array $notNames) - { - $this->notNames = $notNames; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setContains(array $contains) - { - $this->contains = $contains; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setNotContains(array $notContains) - { - $this->notContains = $notContains; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setSizes(array $sizes) - { - $this->sizes = $sizes; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setDates(array $dates) - { - $this->dates = $dates; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setFilters(array $filters) - { - $this->filters = $filters; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setSort($sort) - { - $this->sort = $sort; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setPath(array $paths) - { - $this->paths = $paths; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function setNotPath(array $notPaths) - { - $this->notPaths = $notPaths; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function ignoreUnreadableDirs($ignore = true) - { - $this->ignoreUnreadableDirs = (bool) $ignore; - - return $this; - } - - /** - * Returns whether the adapter is supported in the current environment. - * - * This method should be implemented in all adapters. Do not implement - * isSupported in the adapters as the generic implementation provides a cache - * layer. - * - * @see isSupported() - * - * @return bool Whether the adapter is supported - */ - abstract protected function canBeUsed(); -}