| Method | Description | Returns |
|---|---|---|
| getId() | Returns the ID of the identified site | int |
| getEnvironmentId() | Returns the ID of the identified environment | int |
| getClientId() | Returns the client ID of the identified site | int |
| getName() | Returns the name of current site | string |
| getHostname() | Returns the hostname for the current site as a string | string |
| getSitePath() | Returns the site path for the current site | string |
| isPrimaryEnvironment() | Checks whether the current environment is the primary environment for the site | bool |
| isPrimaryHostname() | Checks whether the current hostname is the primary hostname for current environment | bool |
| isPrimary() | Checks whether the current hostname is the primary hostname for the site. Also checks whether the current environment is the primary environment for the site. | bool |
| getPrimaryHostname() | Returns the primary hostname of the current environment. Returns null if the site does not have a current environment does not have a primary hostname. | string |
| getPrimaryEnvironmentPrimaryHostname() | Returns the primary hostname of the primary environment. Returns null if the site does not have a primary environment or hostname. | string |
| getEnvironmentName() | Returns environment name. | string |
| getLastVcsHash() | Returns the last VCS hash for the current environment. Returns the first 7 characters. | string |
| getAnySiteLastVcsHash() | Returns the last VCS hash the current environment, or (if this is empty) for any site's environment where the name matches the current environment. Returns the first 7 characters. | string |
| isHostnameOfCurrentEnvironment() | Checks whether the provided hostname is contained in the hostnames of the current environment | bool |
AuthSite (Backend)
Current site. Can be access with $_currentSite