6 * Defines the interface for a Boot classes. Any CMS that wishes
7 * to work with Drush should extend BaseBoot. If the CMS has a
8 * Drupal-Compatibility layer, then it should extend DrupalBoot.
10 * @todo Doc these methods.
15 * Select the best URI for the provided cwd. Only called
16 * if the user did not explicitly specify a URI.
18 public function findUri($root, $uri);
21 * Inject the uri for the specific site to be bootstrapped
23 * @param string $uri Site to bootstrap
25 public function setUri($uri);
28 * This function determines if the specified path points to
29 * the root directory of a CMS that can be bootstrapped by
30 * the specific subclass that implements it.
32 * These functions should be written such that one and only
33 * one class will return TRUE for any given $path.
35 * @param $path to a directory to test
37 * @return TRUE if $path is a valid root directory
39 public function validRoot($path);
42 * Given a site root directory, determine the exact version of the software.
45 * The full path to the site installation, with no trailing slash.
47 * The version string for the current version of the software, e.g. 8.1.3
49 public function getVersion($root);
52 * Returns an array that determines what bootstrap phases
53 * are necessary to bootstrap this CMS. This array
54 * should map from a numeric phase to the name of a method
55 * (string) in the Boot class that handles the bootstrap
58 * @see \Drush\Boot\DrupalBoot::bootstrapPhases()
60 * @return array of PHASE index => method name.
62 public function bootstrapPhases();
65 * Return an array mapping from bootstrap phase shorthand
66 * strings (e.g. "full") to the corresponding bootstrap
67 * phase index constant (e.g. DRUSH_BOOTSTRAP_DRUPAL_FULL).
69 public function bootstrapPhaseMap();
72 * Convert from a phase shorthand or constant to a phase index.
74 public function lookUpPhaseIndex($phase);
77 * Called by Drush if a command is not found, or if the
78 * command was found, but did not meet requirements.
80 * The implementation in BaseBoot should be sufficient
81 * for most cases, so this method typically will not need
84 public function reportCommandError($command);
87 * This method is called during the shutdown of drush.
91 public function terminate();