This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/vendor/webflo/drupal-finder
2018-11-23 12:29:20 +00:00
..
src Update Composer, update everything 2018-11-23 12:29:20 +00:00
tests Update Composer, update everything 2018-11-23 12:29:20 +00:00
.gitignore Update Composer, update everything 2018-11-23 12:29:20 +00:00
.styleci.yml Update Composer, update everything 2018-11-23 12:29:20 +00:00
.travis.yml Update Composer, update everything 2018-11-23 12:29:20 +00:00
composer.json Update Composer, update everything 2018-11-23 12:29:20 +00:00
phpunit.xml.dist Update Composer, update everything 2018-11-23 12:29:20 +00:00
README.md Update Composer, update everything 2018-11-23 12:29:20 +00:00

Drupal Finder

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+