function DrupalFinder::getValidEnvironmentVariablePath
Get path stored in environment variable.
Parameters
string $variable: The name of the environment variable to retrieve the path from.
Return value
false|string A path if it is valid. False otherwise.
3 calls to DrupalFinder::getValidEnvironmentVariablePath()
- DrupalFinder::getComposerRoot in vendor/
webflo/ drupal-finder/ src/ DrupalFinder.php - Get the Composer root.
- DrupalFinder::getDrupalRoot in vendor/
webflo/ drupal-finder/ src/ DrupalFinder.php - Get the Drupal root.
- DrupalFinder::getVendorDir in vendor/
webflo/ drupal-finder/ src/ DrupalFinder.php - Get the vendor path.
File
-
vendor/
webflo/ drupal-finder/ src/ DrupalFinder.php, line 280
Class
Namespace
DrupalFinderCode
protected function getValidEnvironmentVariablePath($variable) {
$path = getenv($variable);
if (is_string($path) && is_dir($path)) {
return $path;
}
return false;
}