SiteAliasInterface
interface SiteAliasInterface implements ConfigInterface (View source)
An alias record is a configuration record containing well-known items.
NOTE: SiteAlias is implemented as a Config subclass; however, it should not be used as a config. (A better implementation would be "hasa" config, but that is less convenient, as we want all of the same capabilities as a config object).
If using an alias record as config is desired, use the 'exportConfig()' method.
Example remote alias:
host: www.myisp.org user: www-data root: /path/to/drupal uri: mysite.org
Example local alias with global and command-specific options:
root: /path/to/drupal uri: mysite.org options: no-interaction: true command: user: login: options: name: superuser
Methods
Return the name of this alias record.
Determine whether this alias has a root.
Get the root
Get the uri
Record the uri
Return user@host, or just host if there is no user. Returns an empty string if there is no host.
Get the remote user
Return true if this alias record has a remote user
Get the remote host
Return true if this alias record has a remote host that is not the local host
Return true if the alias record use the Docker Compose transport.
Return true if this alias record is for the local system
Determine whether this alias does not represent any site. An alias record must either be remote or have a root.
Return the 'root' element of this alias if this alias record is local.
Export the configuration values in this alias record, and reconfigure them so that the layout matches that of the global configuration object.
Details
string
name()
Return the name of this alias record.
hasRoot()
Determine whether this alias has a root.
root()
Get the root
uri()
Get the uri
setUri(string $uri)
Record the uri
string
remoteHostWithUser()
Return user@host, or just host if there is no user. Returns an empty string if there is no host.
remoteUser()
Get the remote user
hasRemoteUser()
Return true if this alias record has a remote user
remoteHost()
Get the remote host
isRemote()
internal |
Return true if this alias record has a remote host that is not the local host
bool
isContainer()
internal |
Return true if the alias record use the Docker Compose transport.
isLocal()
Return true if this alias record is for the local system
isNone()
Determine whether this alias does not represent any site. An alias record must either be remote or have a root.
localRoot()
Return the 'root' element of this alias if this alias record is local.
exportConfig()
Export the configuration values in this alias record, and reconfigure them so that the layout matches that of the global configuration object.