class PreflightSiteLocator (View source)

Properties

protected SiteAliasManager $siteAliasManager

Methods

__construct(SiteAliasManager $siteAliasManager)

No description

SiteAlias|false
findSite(PreflightArgsInterface $preflightArgs, Environment $environment, string $root)

During bootstrap, finds the currently selected site from the parameters provided on the commandline.

SiteAlias|false
determineSelf(PreflightArgsInterface $preflightArgs, Environment $environment, $root)

Either look up the specified alias name / site spec, or, if those are invalid, then generate one from the provided root and URI.

SiteAlias
buildSelf(PreflightArgsInterface $preflightArgs, string|null $root)

Generate @self from the provided root and URI.

Details

__construct(SiteAliasManager $siteAliasManager)

No description

Parameters

SiteAliasManager $siteAliasManager

SiteAlias|false findSite(PreflightArgsInterface $preflightArgs, Environment $environment, string $root)

During bootstrap, finds the currently selected site from the parameters provided on the commandline.

If 'false' is returned, that indicates that there was an alias name provided on the commandline that is either missing or invalid.

Parameters

PreflightArgsInterface $preflightArgs

An alias name or site specification

Environment $environment
string $root

The default Drupal root (from site:set, --root or cwd)

Return Value

SiteAlias|false

protected SiteAlias|false determineSelf(PreflightArgsInterface $preflightArgs, Environment $environment, $root)

Either look up the specified alias name / site spec, or, if those are invalid, then generate one from the provided root and URI.

Parameters

PreflightArgsInterface $preflightArgs
Environment $environment
$root

Return Value

SiteAlias|false

protected SiteAlias buildSelf(PreflightArgsInterface $preflightArgs, string|null $root)

Generate @self from the provided root and URI.

Parameters

PreflightArgsInterface $preflightArgs
string|null $root

Return Value

SiteAlias