Property | Type | Description | |
---|---|---|---|
$configurations | array | ||
$logger | Logger |
Method | Description | |
---|---|---|
README ( ) : string | ||
__construct ( ) | Instantiate instance configured to load configurations based on called class name | |
configure ( string $path ) |
Method | Description | |
---|---|---|
configsPath ( ) : string | ||
getArray ( $section, $key, array $default = [], $required = true ) : string[] | ||
getBool ( $section, $key, $default = null, $required = true ) : boolean | ||
getCurrentPassword ( string $prompt ) : string | Prompt user for their user account's password | |
getCurrentUsername ( ) : string | ||
getNumeric ( $section, $key, $default = null, $required = true ) | http://stackoverflow.com/questions/12650802/php-equivalent-of-javascripts-parseint-function | |
getSecret ( string $section, string $key, string $prompt ) : string | Prompt the user for secret input. Secret is cached in $section.$key for later retrieval. | |
getValue ( string $section, string $key, mixed $default = null, boolean $required = true ) : mixed | ||
loadParsedIni ( string $filePath, string $subclass ) : array |
Method | Description | |
---|---|---|
load ( ) : array | Load the configurations from the config file for subclass | |
updateRuntimeConfiguration ( string $section, string $key, string $value ) | Set in memory configs for $section[$key] = $value; this is used exclusively for caching secrets |
public __construct ( ) |
protected configsPath ( ) : string | ||
return | string | Path to configurations |
protected getCurrentPassword ( string $prompt ) : string | ||
$prompt | string | Text to prompt the user |
return | string | Current user's password |
protected getCurrentUsername ( ) : string | ||
return | string | User name of effective user |
protected getNumeric ( $section, $key, $default = null, $required = true ) |
protected getValue ( string $section, string $key, mixed $default = null, boolean $required = true ) : mixed | ||
$section | string | Configuration section in file |
$key | string | Configuration key in section |
$default | mixed | If not required, the default to use |
$required | boolean | If an exception should be raised when value is missing |
return | mixed | Configured value or default |