function drush_get_bootstrap_object

8.0.x bootstrap.inc drush_get_bootstrap_object()
7.x bootstrap.inc drush_get_bootstrap_object()

Get the appropriate bootstrap object. We'll search for a new bootstrap object every time someone asks for one until we start bootstrapping; then we'll returned the same cached one every time.

Return value

\Drush\Boot\Boot

10 calls to drush_get_bootstrap_object()
drush_bootstrap in includes/bootstrap.inc
Bootstrap Drush to the desired phase.
drush_bootstrap_validate in includes/bootstrap.inc
Validate whether a bootstrap phase can be reached.
drush_cli_core_cli in commands/core/cli.drush.inc
Command callback.
drush_command_defaults in includes/command.inc
drush_core_twig_compile in commands/core/core.drush.inc

... See full list

File

includes/bootstrap.inc, line 237

Code

function drush_get_bootstrap_object() {
  $bootstrap = drush_get_context('DRUSH_BOOTSTRAP_OBJECT', FALSE);
  if (!$bootstrap) {
    $bootstrap = drush_select_bootstrap_class();
  }
  return $bootstrap;
}