public function getAppSettings($appName)
{
// what are we doing?
$log = usingLog()->startAction("get settings for '{$appName}' from host '{$this->args[0]}'");
// make sure we have valid host details
$hostDetails = $this->getHostDetails();
// do we have any app settings?
if (!isset($hostDetails->appSettings, $hostDetails->appSettings->{$appName})) {
$log->endAction("setting does not exist :(");
throw new E5xx_ActionFailed(__METHOD__);
}
// yes we do
$value = $hostDetails->appSettings->{$appName};
// log the settings
$printer = new DataPrinter();
$logValue = $printer->convertToString($value);
$log->endAction("settings for '{$appName}' are '{$logValue}'");
// all done
return $value;
}