本文整理汇总了PHP中GenericPlugin::getSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP GenericPlugin::getSetting方法的具体用法?PHP GenericPlugin::getSetting怎么用?PHP GenericPlugin::getSetting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GenericPlugin
的用法示例。
在下文中一共展示了GenericPlugin::getSetting方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSetting
/**
* @see PKPPlugin::getSetting()
* @param $journalId string
* @param $settingName string
*/
function getSetting($journalId, $settingName)
{
// if there isn't a journal_uuid, make one
if ($settingName == 'journal_uuid') {
$uuid = parent::getSetting($journalId, $settingName);
if ($uuid) {
return $uuid;
}
$this->updateSetting($journalId, $settingName, $this->newUUID());
}
return parent::getSetting($journalId, $settingName);
}
示例2: getSetting
/**
* @see PKPPlugin::getSetting()
* @param $journalId int
* @param $settingName string
*/
function getSetting($journalId, $settingName)
{
// if there isn't a journal_uuid, make one
switch ($settingName) {
case 'journal_uuid':
$uuid = parent::getSetting($journalId, $settingName);
if (!is_null($uuid) && $uuid != '') {
return $uuid;
}
$this->updateSetting($journalId, $settingName, $this->newUUID());
break;
case 'pln_network':
$network = parent::getSetting($journalId, 'pln_network');
if ($network) {
return $network;
}
$network = Config::getVar('lockss', 'pln_url', PLN_DEFAULT_NETWORK);
$this->updateSetting($journalId, 'pln_network', $network);
break;
default:
break;
}
return parent::getSetting($journalId, $settingName);
}