本文整理匯總了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));
}
}