protected $includeFilesAtBase = true;
/** @var integer */
protected $searchDepth = 2;
+ /** @var bool */
+ protected $followLinks = false;
public function __construct()
{
return $this;
}
+ /**
+ * Specify that the discovery object should follow symlinks. By
+ * default, symlinks are not followed.
+ */
+ public function followLinks($followLinks = true)
+ {
+ $this->followLinks = $followLinks;
+ return $this;
+ }
+
/**
* Set the list of search locations to examine in each directory where
* command files may be found. This replaces whatever was there before.
$finder->exclude($item);
}
+ if ($this->followLinks) {
+ $finder->followLinks();
+ }
+
return $finder;
}