class EmptyBoot extends BaseBoot (View source)

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

The 'empty' boot must be careful to never change state, in case bootstrap code might later come along and set a site (e.g. in command completion).

Traits

LoggerAwareTrait

Properties

protected string|bool $uri from  BaseBoot
protected int $phase from  BaseBoot

Methods

__construct()

No description

from  BaseBoot
findUri($root, $uri)

Select the best URI for the provided cwd. Only called if the user did not explicitly specify a URI.

from  BaseBoot
string
getUri()

No description

from  BaseBoot
setUri(string $uri)

Inject the uri for the specific site to be bootstrapped

from  BaseBoot
int
getPhase()

No description

from  BaseBoot
void
setPhase(int $phase)

No description

from  BaseBoot
bool
validRoot(string|null $path)

This function determines if the specified path points to the root directory of a CMS that can be bootstrapped by the specific subclass that implements it.

string|null
getVersion(string $root)

Given a site root directory, determine the exact version of the software.

from  BaseBoot
commandDefaults()

No description

from  BaseBoot
reportCommandError($command)

Called by Drush if a command is not found, or if the command was found, but did not meet requirements.

from  BaseBoot
array
bootstrapPhaseMap()

Return an array mapping from bootstrap phase shorthand strings (e.g. "full") to the corresponding bootstrap phase index constant (e.g. DRUSH_BOOTSTRAP_DRUPAL_FULL).

from  BaseBoot
lookUpPhaseIndex($phase)

Convert from a phase shorthand or constant to a phase index.

from  BaseBoot
bootstrapDrush()

No description

from  BaseBoot
bool
hasRegisteredSymfonyCommand($application, $name)

No description

from  BaseBoot
void
terminate()

This method is called during the shutdown of drush.

from  BaseBoot
array
bootstrapPhases()

Returns an array that determines what bootstrap phases are necessary to bootstrap this CMS. This array should map from a numeric phase to the name of a method (string) in the Boot class that handles the bootstrap phase.

array
bootstrapInitPhases()

No description

Details

__construct()

No description

findUri($root, $uri)

Select the best URI for the provided cwd. Only called if the user did not explicitly specify a URI.

Parameters

$root
$uri

string getUri()

No description

Return Value

string

setUri(string $uri)

Inject the uri for the specific site to be bootstrapped

Parameters

string $uri

Site to bootstrap

int getPhase()

No description

Return Value

int

void setPhase(int $phase)

No description

Parameters

int $phase

Return Value

void

bool validRoot(string|null $path)

This function determines if the specified path points to the root directory of a CMS that can be bootstrapped by the specific subclass that implements it.

These functions should be written such that one and only one class will return TRUE for any given $path.

Parameters

string|null $path

Return Value

bool

string|null getVersion(string $root)

Given a site root directory, determine the exact version of the software.

Parameters

string $root

The full path to the site installation, with no trailing slash.

Return Value

string|null

The version string for the current version of the software, e.g. 8.1.3

commandDefaults()

No description

reportCommandError($command)

Called by Drush if a command is not found, or if the command was found, but did not meet requirements.

The implementation in BaseBoot should be sufficient for most cases, so this method typically will not need to be overridden.

Parameters

$command

array bootstrapPhaseMap()

Return an array mapping from bootstrap phase shorthand strings (e.g. "full") to the corresponding bootstrap phase index constant (e.g. DRUSH_BOOTSTRAP_DRUPAL_FULL).

Return Value

array

lookUpPhaseIndex($phase)

Convert from a phase shorthand or constant to a phase index.

Parameters

$phase

bootstrapDrush()

No description

protected bool hasRegisteredSymfonyCommand($application, $name)

No description

Parameters

$application
$name

Return Value

bool

void terminate()

This method is called during the shutdown of drush.

Return Value

void

array bootstrapPhases()

Returns an array that determines what bootstrap phases are necessary to bootstrap this CMS. This array should map from a numeric phase to the name of a method (string) in the Boot class that handles the bootstrap phase.

Return Value

array

of PHASE index => method name.

array bootstrapInitPhases()

No description

Return Value

array