Core classCoredna\Kernel\Auth

Auth\Site

Current site. Can be access with $_currentSite

Coredna\Kernel\Auth\Site

Properties 15

Take no arguments.

# getId()
int
Returns the ID of the identified site
# getEnvironmentId()
int
Returns the ID of the identified environment
# getClientId()
int
Returns the client ID of the identified site
# getName()
string
Returns the name of current site
# getHostname()
string
Returns the hostname for the current site as a string
# getSitePath()
string
Returns the site path for the current site
# isPrimaryEnvironment()
bool
Checks whether the current environment is the primary environment for the site
# isPrimaryHostname()
bool
Checks whether the current hostname is the primary hostname for current environment
# isPrimary()
bool
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.
# getPrimaryHostname()
?string
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.
# getPrimaryEnvironmentPrimaryHostname()
?string
Returns the primary hostname of the primary environment. Returns null if the site does not have a primary environment or hostname.
# getEnvironmentName()
string
Returns environment name.
# getLastVcsHash()
string
Returns the last VCS hash for the current environment. Returns the first 7 characters.
# getAnySiteLastVcsHash()
string
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.
# isHostnameOfCurrentEnvironment()
bool
Checks whether the provided hostname is contained in the hostnames of the current environment