Bart\Configuration\Configuration::getSecret PHP Method

getSecret() protected method

Prompt the user for secret input. Secret is cached in $section.$key for later retrieval.
protected getSecret ( string $section, string $key, string $prompt ) : string
$section string Section in which to use key to save secret in cache only
$key string Key name to associate with secret in cache only
$prompt string Text to prompt user input
return string Secret input from user
    protected function getSecret($section, $key, $prompt)
    {
        $cached = $this->getValue($section, $key, null, false);
        // If we already prompted for the value
        if ($cached) {
            return $cached;
        }
        /** @var \Bart\Shell $shell */
        $shell = Diesel::create('\\Bart\\Shell');
        $secret = $shell->std_in_secret($prompt);
        $this->updateRuntimeConfiguration($section, $key, $secret);
        return $secret;
    }