Site Alias Manager¶
The Site Alias Manager (SAM) service is used to retrieve information about one or all of the site aliases for the current installation.
- An informative example is the browse command
- A commandfile gets access to the SAM by implementing the SiteAliasManagerAwareInterface and useing the SiteAliasManagerAwareTrait trait. Then you gain access via
- If an alias was used for the current request, it is available via
- The SAM generally deals in SiteAlias objects. That is how any given site alias is represented. See its methods for determining things like whether the alias points to a local host or remote host.
- Site alias docs.
- Dynamically alter site aliases.
- The SAM is also available for as a standalone Composer project. More information available in the README there.
Last update: October 3, 2021