BootstrapManager
class BootstrapManager implements LoggerAwareInterface, ConfigAwareInterface (View source)
Traits
Properties
protected DrushDrupalFinder|null | $drupalFinder | ||
protected Boot[] | $bootstrapCandidates | ||
protected Boot|null | $bootstrap | ||
protected int|null | $phase |
Methods
Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.
No description
No description
No description
Return the framework root selected by the user.
Return the composer root for the selected Drupal site.
Return the framework uri selected by the user.
This method is called by the Application iff the user did not explicitly provide a URI.
No description
Crete the bootstrap object if necessary, then return it.
Look up the best bootstrap class for the given location from the set of available candidates.
Returns an array that determines what bootstrap phases are necessary to bootstrap the CMS.
Bootstrap Drush to the desired phase.
hasBootstrap determines whether the manager has a bootstrap object yet.
Determine whether a given bootstrap phase has been completed.
Validate whether a bootstrap phase can be reached.
Bootstrap to the specified phase.
No description
Bootstrap to the specified phase.
Bootstrap to the highest level possible, without triggering any errors.
Allow those with a reference to the BootstrapManager to use its logger
Details
DrushConfig
getConfig()
Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.
int
getPhase()
No description
protected void
setPhase(int $phase)
No description
void
add(Boot|array $candidateList)
Add a bootstrap object to the list of candidates.
DrushDrupalFinder
drupalFinder()
No description
void
setDrupalFinder(DrushDrupalFinder $drupalFinder)
No description
string
getRoot()
Return the framework root selected by the user.
string
getComposerRoot()
Return the composer root for the selected Drupal site.
getUri()
Return the framework uri selected by the user.
selectUri($cwd)
This method is called by the Application iff the user did not explicitly provide a URI.
void
setUri($uri)
No description
DrupalBoot8
bootstrap()
Crete the bootstrap object if necessary, then return it.
void
injectBootstrap(DrupalBoot8 $bootstrap)
For use in testing
Boot
bootstrapObjectForRoot($path)
Look up the best bootstrap class for the given location from the set of available candidates.
array
bootstrapPhases(bool $function_names = false)
Returns an array that determines what bootstrap phases are necessary to bootstrap the CMS.
bool
doBootstrap(int $phase, int|bool $phase_max = false, AnnotationData|null $annotationData = null)
Bootstrap Drush to the desired phase.
This function will sequentially bootstrap each lower phase up to the phase that has been requested.
bool
hasBootstrap()
hasBootstrap determines whether the manager has a bootstrap object yet.
bool
hasBootstrapped(int $phase)
Determine whether a given bootstrap phase has been completed.
bool
bootstrapValidate(int $phase)
Validate whether a bootstrap phase can be reached.
This function will validate the settings that will be used during the actual bootstrap process, and allow commands to progressively bootstrap to the highest level that can be reached.
This function will only run the validation function once, and store the result from that execution in a local static. This avoids validating phases multiple times.
bool
bootstrapToPhase(string $bootstrapPhase, AnnotationData|null $annotationData = null)
Bootstrap to the specified phase.
protected
maxPhaseLimit($bootstrap_str)
No description
bool
bootstrapToPhaseIndex(int $max_phase_index, AnnotationData|null $annotationData = null)
Bootstrap to the specified phase.
int
bootstrapMax(bool|int|null $max_phase_index = false, AnnotationData|null $annotationData = null)
Bootstrap to the highest level possible, without triggering any errors.
LoggerInterface|null
logger()
Allow those with a reference to the BootstrapManager to use its logger