function drush_get_bootstrap_candidate_classnames

8.0.x drush_get_bootstrap_candidate_classnames()
7.x drush_get_bootstrap_candidate_classnames()

Find the list of bootstrap classnames available for initializing a CMS with Drush.

Return value


1 call to drush_get_bootstrap_candidate_classnames()
drush_get_bootstrap_candidates in includes/
Return the list of bootstrap objects that are available for initializing a CMS with Drush. We insure that any given candidate class is instantiated only once.


includes/, line 144


function drush_get_bootstrap_candidate_classnames() {
  // Give all commandfiles a chance to return candidates.  They should
  // return STRINGS with the class name of the bootstrap object they provide.
  $candidates = drush_command_invoke_all('bootstrap_candidates');
  // If a bootstrap class was specified on the command line, consider it first.
  $bootstrap_class = drush_get_option('bootstrap_class', FALSE);
  if ($bootstrap_class) {
    array_unshift($candidates, $bootstrap_class);
  // Add candidate bootstrap classes for Drupal
  foreach (array('8', '7', '6') as $version) {
    $drupal_bootstrap_class = 'Drush\Boot\DrupalBoot' . $version;
    $candidates[] = $drupal_bootstrap_class;
  // Always consider our default bootstrap class last.
  $candidates[] = 'Drush\Boot\EmptyBoot';

  return $candidates;