PHP Class Pantheon\Terminus\Config

Inheritance: extends Robo\Config
Afficher le fichier Open project: pantheon-systems/terminus Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Constructor for Config
public __construct ( )

ensureDirExists() public méthode

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
Résultat boolean | null

fixDirectorySeparators() public méthode

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

get() public méthode

public get ( $key, $defaultOverride = null )

getGlobalOptionDefaultValues() public méthode

getHomeDir() public méthode

Adapted from Terminus Package Manager by Ed Reel
public getHomeDir ( ) : string
Résultat string