
| Current Path : /var/www/html/rocksensor2/vendor/drush/drush/docs/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor2/vendor/drush/drush/docs/site-alias-manager.md |
Site Alias Manager ================== The [Site Alias Manager (SAM)](https://github.com/consolidation/site-alias/blob/4.0.1/src/SiteAliasManager.php) 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](https://github.com/drush-ops/drush/blob/13.x/src/Commands/core/BrowseCommands.php) - A commandfile gets usually access to the SAM via [autowire](dependency-injection.md#autowire). The type hint to use is SiteAliasManagerInterface - If an alias was used for the current request, it is available via `$this->siteAliasManager->getself()`. - The SAM generally deals in [SiteAlias](https://github.com/consolidation/site-alias/blob/main/src/SiteAlias.php) 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](site-aliases.md). - [Dynamically alter site aliases](https://raw.githubusercontent.com/drush-ops/drush/11.x/examples/Commands/SiteAliasAlterCommands.php). - The SAM is also available for as [a standalone Composer project](https://github.com/consolidation/site-alias). More information available in the README there.