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
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, $root)

Generate @self from the provided root and URI.

Details

__construct(SiteAliasManager $siteAliasManager)

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 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

protected SiteAlias buildSelf(PreflightArgsInterface $preflightArgs, $root)

Generate @self from the provided root and URI.

Parameters

PreflightArgsInterface $preflightArgs
$root

Return Value

SiteAlias