function DrupalFinder::__construct
Initialize finder.
Optionally pass the starting path.
@todo Make $start_path mandatory in v2.
Parameters
string|null $start_path: The path to begin the search from.
Throws
\Exception
File
-
vendor/
webflo/ drupal-finder/ src/ DrupalFinder.php, line 65
Class
Namespace
DrupalFinderCode
public function __construct($start_path = null) {
// Initialize path variables to false, indicating their locations are
// not yet known.
$this->drupalRoot = false;
$this->composerRoot = false;
$this->vendorDir = false;
// If a starting path was provided, attempt to locate and set path
// variables.
if (!empty($start_path)) {
$this->discoverRoots($start_path);
}
}