function drush_bootstrap_class_for_root

8.0.x drush_bootstrap_class_for_root($path)
7.x drush_bootstrap_class_for_root($path)

Look up the best bootstrap class for the given location from the set of available candidates.

3 calls to drush_bootstrap_class_for_root()
drush_drupal_version in includes/
Detects the version number of the current Drupal installation, if any. Returns FALSE if there is no current Drupal installation, or it is somehow broken.
drush_select_bootstrap_class in includes/
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/
Checks whether given path qualifies as a Drupal root.


includes/, line 168


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;