webflo/drupal-finder

Helper class to locate a Drupal installation from a given path.

Installs: 3 747 934

Dependents: 178

Suggesters: 0

Stars: 105

Watchers: 3

Forks: 15

Open Issues: 10

1.1.0 2017-10-24 08:12 UTC

README

Travis Packagist

Drupal Finder provides a class to locate a Drupal installation in a given path.

Usage

$drupalFinder = new \DrupalFinder\DrupalFinder();
if ($drupalFinder->locateRoot(getcwd())) {
    $drupalRoot = $drupalFinder->getDrupalRoot();
    $composerRoot = $drupalFinder->getComposerRoot();
    ...
}

Examples

License

GPL-2.0+