class SiteAliasWithConfig implements SiteAliasInterface, ConfigRuntimeInterface (View source)

SiteAliasWithConfig delegates to a site alias, and also combines it with two config stores:

  • Runtime config (set on commandline): Options that override site alias contents
  • Default config (set from config files): Default options

Traits

Common implementation of some SiteAlias methods.

Properties

protected $runtimeConfig
protected $siteAlias
protected $defaultConfig

Methods

hasRoot()

No description

root()

No description

uri()

No description

setUri($uri)

No description

remoteHostWithUser()

No description

remoteUser()

No description

hasRemoteUser()

No description

remoteHost()

No description

isRemote()

No description

isLocal()

No description

isContainer()

No description

isNone()

No description

localRoot()

No description

string
os()

os returns the OS that this alias record points to. For local alias records, PHP_OS will be returned. For remote alias records, the value from the os element will be returned. If there is no os element, then the default assumption is that the remote system is Linux.

__construct(SiteAliasInterface $siteAlias, ConfigInterface $defaultConfig, ConfigInterface $runtimeConfig)

No description

static SiteAlias
create(SiteAliasInterface $siteAlias, ConfigInterface $defaultConfig, ConfigInterface|null $runtimeConfig = null)

combine the provided site alias with configuration.

static 
determineCorrectRuntimeConfig(ConfigInterface $defaultConfig, ConfigInterface $runtimeConfig)

Determine what object to use for the runtime config. If a specific runtime config is given, use that. Otherwise, pull it from the default configuration if available.

runtimeConfig()

No description

string
name()

No description

has($key)

No description

get($key, $defaultFallback = null)

No description

set($key, $value)

No description

import($data)

No description

replace($data)

No description

combine($data)

No description

export()

Export all configuration as a nested array.

hasDefault($key)

No description

getDefault($key, $defaultFallback = null)

No description

setDefault($key, $value)

No description

exportConfig()

No description

changesProhibited()

No description

Details

hasRoot()

No description

root()

No description

Exceptions

Exception

uri()

No description

setUri($uri)

No description

Parameters

$uri

remoteHostWithUser()

No description

remoteUser()

No description

hasRemoteUser()

No description

remoteHost()

No description

isRemote()

No description

isLocal()

No description

isContainer()

No description

isNone()

No description

localRoot()

No description

string os()

os returns the OS that this alias record points to. For local alias records, PHP_OS will be returned. For remote alias records, the value from the os element will be returned. If there is no os element, then the default assumption is that the remote system is Linux.

Return Value

string

Linux WIN (e.g. WINNT) CYGWIN MINGW (e.g. MINGW32)

__construct(SiteAliasInterface $siteAlias, ConfigInterface $defaultConfig, ConfigInterface $runtimeConfig)

No description

Parameters

SiteAliasInterface $siteAlias
ConfigInterface $defaultConfig
ConfigInterface $runtimeConfig

static SiteAlias create(SiteAliasInterface $siteAlias, ConfigInterface $defaultConfig, ConfigInterface|null $runtimeConfig = null)

combine the provided site alias with configuration.

Parameters

SiteAliasInterface $siteAlias
ConfigInterface $defaultConfig
ConfigInterface|null $runtimeConfig

Return Value

SiteAlias

read-only site alias combined with the runtime config (overrides the site alias values) and the default config.

static protected determineCorrectRuntimeConfig(ConfigInterface $defaultConfig, ConfigInterface $runtimeConfig)

Determine what object to use for the runtime config. If a specific runtime config is given, use that. Otherwise, pull it from the default configuration if available.

Parameters

ConfigInterface $defaultConfig
ConfigInterface $runtimeConfig

runtimeConfig()

No description

string name()

No description

Return Value

string

has($key)

No description

Parameters

$key

get($key, $defaultFallback = null)

No description

Parameters

$key
$defaultFallback

set($key, $value)

No description

Parameters

$key
$value

import($data)

No description

Parameters

$data

replace($data)

No description

Parameters

$data

combine($data)

No description

Parameters

$data

export()

Export all configuration as a nested array.

hasDefault($key)

No description

Parameters

$key

getDefault($key, $defaultFallback = null)

No description

Parameters

$key
$defaultFallback

setDefault($key, $value)

No description

Parameters

$key
$value

exportConfig()

No description

protected changesProhibited()

No description