Prose\FromEnvironment::getAppSetting PHP Method

getAppSetting() public method

public getAppSetting ( $appName, $settingName )
    public function getAppSetting($appName, $settingName)
    {
        // what are we doing?
        $log = usingLog()->startAction("get {$settingName} for '{$appName}'");
        // do we have any settings anywhere for this app?
        $appSettings = $this->getAppSettings($appName);
        // do we have the setting we want?
        if (!isset($appSettings->{$settingName})) {
            throw new E5xx_ActionFailed(__METHOD__);
        }
        // if we get here, then we have what we want
        $value = $appSettings->{$appName};
        $printer = new DataPrinter();
        $logValue = $printer->convertToString($value);
        $log->endAction("setting for '{$appName}' is '{$logValue}'");
        // all done
        return $value;
    }