本文整理汇总了PHP中XWB_plugin::setPCfg方法的典型用法代码示例。如果您正苦于以下问题:PHP XWB_plugin::setPCfg方法的具体用法?PHP XWB_plugin::setPCfg怎么用?PHP XWB_plugin::setPCfg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XWB_plugin
的用法示例。
在下文中一共展示了XWB_plugin::setPCfg方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switchMode
function switchMode($LTXCfg = 1, $UTXCfg = '', $BTXCfg = '')
{
$FTParams = 1 == $LTXCfg ? array('nbool_LTXCfg' => $LTXCfg, 'http_UTXCfg' => $UTXCfg, 'http_BTXCfg' => $BTXCfg) : array('nbool_LTXCfg' => $LTXCfg);
if ($this->_FTHelper($FTParams)) {
$config = 1 == $LTXCfg ? array('switch_to_xweibo' => (int) $LTXCfg, 'url_to_xweibo' => $UTXCfg, 'baseurl_to_xweibo' => $BTXCfg) : array('switch_to_xweibo' => (int) $LTXCfg);
XWB_plugin::setPCfg($config) || $this->_ERHelper('4021001');
$this->rst = TRUE;
}
$this->_LogHelper($this->apiRoute . '/switchMode');
return array('rst' => $this->rst, 'errno' => $this->errno, 'err' => $this->err);
}
示例2: closeApi
/**
* 关闭远程API
*/
function closeApi()
{
$stx = XWB_plugin::pCfg('switch_to_xweibo');
if (XWB_plugin::setPCfg(array('switch_to_xweibo' => 0))) {
$api = XWB_plugin::N('apixwb');
$response = $api->setNotice(0, '', FALSE);
// if( !is_array($response) || 0 != $response['errno']) {
// XWB_plugin::setPCfg(array('switch_to_xweibo' => $stx));
// }
exit(json_encode($response));
} else {
exit(json_encode(array('errno' => 1, 'err' => '配置文件无法写入')));
}
}
示例3: closeApi
/**
* 关闭远程API
*/
function closeApi()
{
if (!xwb_token::checkInput('p', $this->tokehash, true)) {
exit(json_encode(array('errno' => 1, 'err' => '令牌验证失败,请返回重试')));
}
$stx = XWB_plugin::pCfg('switch_to_xweibo');
if (XWB_plugin::setPCfg(array('switch_to_xweibo' => 0))) {
$api = XWB_plugin::N('apixwb');
$response = $api->setNotice(0, '', FALSE);
// if( !is_array($response) || 0 != $response['errno']) {
// XWB_plugin::setPCfg(array('switch_to_xweibo' => $stx));
// }
exit(json_encode($response));
} else {
exit(json_encode(array('errno' => 1, 'err' => '配置文件无法写入')));
}
}
示例4: doPluginCfg4ocSet
function doPluginCfg4ocSet()
{
if (!defined('XWB_S_IS_ADMIN') || !XWB_S_IS_ADMIN || !XWB_plugin::isRequestBy('POST')) {
XWB_plugin::deny('');
}
$set = (array) XWB_plugin::V('p:pluginCfg');
$newset = array();
$inputCheck = array('is_rebutton_relateUid_assoc' => array(0, 1), 'display_ow_in_forum_index' => array(0, 1));
$newset = $this->_filterInput($set, $inputCheck);
if (!XWB_plugin::setPCfg($newset)) {
$ret = array(0, '设置保存失败,请检查插件目录是否可写。');
} else {
$ret = array(1, '设置成功');
}
$this->_oScript('xwbSetTips', $ret);
}
示例5: _updateNextProcess
/**
* 更新下一进程信息(同时解锁)
* @param int|null $nextUpdateSec 下次更新时间应该在这次更新时间的多少秒之后?传入空值表示由程序决定
*/
function _updateNextProcess($nextUpdateSec = null)
{
if (true == $this->_maxidDetect) {
XWB_plugin::setPCfg('pushback_fromid', $this->_maxid);
}
$this->_determineNextUpdateTime($nextUpdateSec);
$this->_db->query('REPLACE INTO ' . DB::table('common_cache') . " (`cachekey`, `cachevalue`, `dateline`) VALUES \n\t\t ('xwb_pushback_nexttime', '{$this->_nexttime}', '{$this->_thistime}'),\n\t\t ('xwb_pushback_lasttime', '{$this->_thistime}', '{$this->_thistime}'),\n\t\t ('xwb_pushback_updatesec', '{$this->_updatesec}', '{$this->_thistime}'),\n\t\t ('xwb_pushback_processlock', '0', '{$this->_thistime}')\n\t\t");
if (true == $this->_maxidDetect) {
$this->_log('评论回推更新下一进程信息:下次更新时间:' . date("Y-m-d H:i:s", $this->_nexttime) . ';下次评论回推的最大id:' . $this->_maxid);
} else {
$this->_log('评论回推更新下一进程信息:不更新评论回推的最大id;下次更新时间:' . date("Y-m-d H:i:s", $this->_nexttime));
}
}