2017 © Pedro Peláez
 

library drupal-finder

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

image

webflo/drupal-finder

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

  • Tuesday, October 24, 2017
  • by webflo
  • Repository
  • 2 Watchers
  • 96 Stars
  • 1,979,955 Installations
  • PHP
  • 123 Dependents
  • 0 Suggesters
  • 12 Forks
  • 6 Open issues
  • 13 Versions
  • 18 % Grown

The README.md

Drupal Finder

GitHub Workflow Status Packagist, (*1)

Drupal Finder provides a class to locate a Drupal installation in a given path., (*2)

Usage

$drupalFinder = new \DrupalFinder\DrupalFinder(getcwd());

$drupalRoot = $drupalFinder->getDrupalRoot();
$composerRoot = $drupalFinder->getComposerRoot();
$vendorDir = $drupalFinder->getVendorDir();

Environment variables

If a set of environment variables is specified, then Drupal Finder uses those values to determine the paths of the pertinent directories:, (*3)

  • DRUPAL_FINDER_DRUPAL_ROOT
  • DRUPAL_FINDER_COMPOSER_ROOT
  • DRUPAL_FINDER_VENDOR_DIR

For example:, (*4)

  • DRUPAL_FINDER_DRUPAL_ROOT=/var/www/web
  • DRUPAL_FINDER_COMPOSER_ROOT=/var/www
  • DRUPAL_FINDER_VENDOR_DIR=/var/www/vendor

This is useful for situations where you are containerizing an application, directories may be in odd places, or a composer.json might be missing since it is unneeded in a final build artifact., (*5)

You are not required to set all the environment variables to use this feature. If you set an environment variable, then its associated getter function will return the value assigned to the environment variable., (*6)

Examples

License

GPL-2.0+, (*7)

The Versions

24/10 2017

dev-master

9999999-dev

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

24/10 2017

1.1.0

1.1.0.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

08/08 2017

1.0.0

1.0.0.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

01/08 2017

0.4.2

0.4.2.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

27/07 2017

0.4.1

0.4.1.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

25/07 2017

0.4.0

0.4.0.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

04/05 2017

0.3.0

0.3.0.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

28/11 2016

0.2.1

0.2.1.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

24/11 2016

0.2.0

0.2.0.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

12/11 2016

0.1.1

0.1.1.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

10/11 2016

0.1.0

0.1.0.0

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

  Sources   Download

GPL-2.0+

The Development Requires

by Florian Weber

05/11 2016

0.0.2

0.0.2.0

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

  Sources   Download

GPL-2.0+

by Florian Weber

07/10 2016

0.0.1

0.0.1.0

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

  Sources   Download

by Florian Weber