本文整理汇总了PHP中Q_Config::clearOnServer方法的典型用法代码示例。如果您正苦于以下问题:PHP Q_Config::clearOnServer方法的具体用法?PHP Q_Config::clearOnServer怎么用?PHP Q_Config::clearOnServer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q_Config
的用法示例。
在下文中一共展示了Q_Config::clearOnServer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Q_Config_post
/**
* Handle different tasks related to Q config
*/
function Q_Config_post()
{
switch (isset($_REQUEST['Q/method']) ? $_REQUEST['Q/method'] : null) {
case 'clear':
if (!isset($_REQUEST['filename'])) {
throw new Q_Exception("'filename' is not defined in 'clear', 'Q/config' handler");
} else {
$filename = $_REQUEST['filename'];
}
if (!isset($_REQUEST['args'])) {
throw new Q_Exception("'args' is not defined in 'clear', 'Q/config' handler");
} else {
$args = $_REQUEST['args'];
}
if (!isset($_REQUEST['noSave'])) {
throw new Q_Exception("'noSave' is not defined in 'clear', 'Q/config' handler");
} else {
$noSave = $_REQUEST['noSave'];
}
Q_Config::$cache = Q_Config::clearOnServer($filename, $args, $noSave);
break;
case 'set':
if (!isset($_REQUEST['filename'])) {
throw new Q_Exception("'filename' is not defined in 'set', 'Q/config' handler");
} else {
$filename = $_REQUEST['filename'];
}
if (!isset($_REQUEST['data'])) {
throw new Q_Exception("'data' is not defined in 'set', 'Q/config' handler");
} else {
$data = $_REQUEST['data'];
}
if (!isset($_REQUEST['clear'])) {
throw new Q_Exception("'clear' is not defined in 'set', 'Q/config' handler");
} else {
$clear = $_REQUEST['clear'];
}
Q_Config::$cache = Q_Config::setOnServer($filename, $data, $clear);
break;
case 'get':
if (!isset($_REQUEST['filename'])) {
throw new Q_Exception("'filename' is not defined in 'put', 'Q/config' handler");
} else {
$filename = $_REQUEST['filename'];
}
Q_Config::$cache = Q_Config::getFromServer($filename);
break;
default:
throw new Q_Exception("Unknown 'Q/method' in 'Q/config' handler");
break;
}
}