PHP Class Pantheon\Terminus\Config

Inheritance: extends Robo\Config
显示文件 Open project: pantheon-systems/terminus Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor for Config
ensureDirExists ( string $name, string $value ) : boolean | null Ensures a directory exists
fixDirectorySeparators ( string $path ) : string Ensures that directory paths work in any system
get ( $key, $defaultOverride = null )
getGlobalOptionDefaultValues ( )
getHomeDir ( ) : string Returns the appropriate home directory.

Private Methods

Method Description
configure ( ) : void Sets constants necessary for the proper functioning of Terminus
getKeyFromConstant ( string $constant_name ) : string Reflects a key name given a Terminus constant name
getPhpBinary ( ) : string Returns location of PHP with which to run Terminus
getTerminusRoot ( string $current_dir = null ) : string Finds and returns the root directory of Terminus
getTerminusScript ( ) : string Finds and returns the name of the script running Terminus functions
importEnvironmentVariables ( ) : void Imports environment variables
replacePlaceholders ( string $string ) : string Exchanges values in [[ ]] in the given string with constants

Method Details

__construct() public method

Constructor for Config
public __construct ( )

ensureDirExists() public method

Ensures a directory exists
public ensureDirExists ( string $name, string $value ) : boolean | null
$name string The name of the config var
$value string The value of the named config var
return boolean | null

fixDirectorySeparators() public method

Ensures that directory paths work in any system
public fixDirectorySeparators ( string $path ) : string
$path string A path to set the directory separators for
return string

get() public method

public get ( $key, $defaultOverride = null )

getGlobalOptionDefaultValues() public method

getHomeDir() public method

Adapted from Terminus Package Manager by Ed Reel
public getHomeDir ( ) : string
return string