PHP Class Platformsh\Cli\CliConfig

Mostra file Open project: commerceguys/platform-cli Class Usage Examples

Protected Properties

Property Type Description
$config
$env
$userConfig

Public Methods

Method Description
__construct ( array $env = null, string | null $defaultsFile = null, boolean $reset = false )
get ( string $name ) : mixed
getUserConfig ( ) : array
getUserConfigDir ( ) : string
has ( string $name, boolean $notNull = true ) : boolean
writeUserConfig ( array $config ) Update user configuration.

Protected Methods

Method Description
applyEnvironmentOverrides ( )
applyUserConfigOverrides ( )
getEnv ( string $name ) : mixed | false Get an environment variable
loadConfigFromFile ( string $filename ) : array

Method Details

__construct() public method

public __construct ( array $env = null, string | null $defaultsFile = null, boolean $reset = false )
$env array
$defaultsFile string | null
$reset boolean

applyEnvironmentOverrides() protected method

applyUserConfigOverrides() protected method

protected applyUserConfigOverrides ( )

get() public method

public get ( string $name ) : mixed
$name string
return mixed

getEnv() protected method

Get an environment variable
protected getEnv ( string $name ) : mixed | false
$name string The variable name. The configured prefix will be prepended.
return mixed | false The value of the environment variable, or false if it is not set.

getUserConfig() public method

public getUserConfig ( ) : array
return array

getUserConfigDir() public method

public getUserConfigDir ( ) : string
return string

has() public method

public has ( string $name, boolean $notNull = true ) : boolean
$name string
$notNull boolean
return boolean

loadConfigFromFile() protected method

protected loadConfigFromFile ( string $filename ) : array
$filename string
return array

writeUserConfig() public method

Update user configuration.
public writeUserConfig ( array $config )
$config array

Property Details

$config protected_oe static_oe property

protected static $config

$env protected_oe property

protected $env

$userConfig protected_oe property

protected $userConfig