function drush_bootstrap_class_for_root

8.0.x bootstrap.inc drush_bootstrap_class_for_root($path)
7.x bootstrap.inc drush_bootstrap_class_for_root($path)
2 calls to drush_bootstrap_class_for_root()
drush_select_bootstrap_class in includes/bootstrap.inc
Select the bootstrap class to use. If this is called multiple times, the bootstrap class returned might change on subsequent calls, if the root directory changes. Once the bootstrap object starts changing the state of the system, however, it will be…
drush_valid_root in includes/environment.inc
Checks whether given path qualifies as a Drupal root.

File

includes/bootstrap.inc, line 164

Code

function drush_bootstrap_class_for_root($path) {
  $candidates = drush_get_bootstrap_candidates();
  foreach ($candidates as $candidate) {
    if ($candidate->valid_root($path)) {
      return $candidate;
    }
  }
  return NULL;
}