EmptyBoot.php

  1. 8.0.x lib/Drush/Boot/EmptyBoot.php
  2. 7.x lib/Drush/Boot/EmptyBoot.php
  3. master lib/Drush/Boot/EmptyBoot.php

Namespace

Drush\Boot

Classes

Namesort descending Description
EmptyBoot This is a do-nothing 'Boot' class that is used when there is no site at --root, or when no root is specified.

File

lib/Drush/Boot/EmptyBoot.php
View source
  1. <?php
  2. namespace Drush\Boot;
  3. /**
  4. * This is a do-nothing 'Boot' class that is used when there
  5. * is no site at --root, or when no root is specified.
  6. *
  7. * The 'empty' boot must be careful to never change state,
  8. * in case bootstrap code might later come along and set
  9. * a site (e.g. in command completion).
  10. */
  11. class EmptyBoot extends BaseBoot {
  12. function __construct() {
  13. }
  14. function valid_root($path) {
  15. return FALSE;
  16. }
  17. function bootstrap_phases() {
  18. return array(
  19. DRUSH_BOOTSTRAP_DRUSH => '_drush_bootstrap_drush',
  20. );
  21. }
  22. function bootstrap_init_phases() {
  23. return array(DRUSH_BOOTSTRAP_DRUSH);
  24. }
  25. function command_defaults() {
  26. return array(
  27. // TODO: Historically, commands that do not explicitly specify
  28. // their bootstrap level default to DRUSH_BOOTSTRAP_DRUPAL_LOGIN.
  29. // This isn't right any more, but we can't just change this to
  30. // DRUSH_BOOTSTRAP_DRUSH, or we will start running commands that
  31. // needed a full bootstrap with no bootstrap, and that won't work.
  32. // For now, we will continue to force this to 'login'. Any command
  33. // that does not declare 'bootstrap' is declaring that it is a Drupal
  34. // command.
  35. 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_LOGIN,
  36. );
  37. }
  38. }