本文整理汇总了PHP中settings::set方法的典型用法代码示例。如果您正苦于以下问题:PHP settings::set方法的具体用法?PHP settings::set怎么用?PHP settings::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类settings
的用法示例。
在下文中一共展示了settings::set方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
function save()
{
settings::set('feedback', 'feedback_email', params::get('feedback_email'));
settings::set('feedback', 'feedback_subject', params::get('feedback_subject'));
settings::save('feedback');
headers::self();
}
示例2: genToken
public static function genToken()
{
try {
$code = str_random(30);
settings::set("securityToken", $code);
} catch (ParseException $e) {
printf("Can´t generate a new Token: %s", $e->getMessage());
}
}
示例3: save
function save()
{
settings::set('pages', 'global_page_keywords', params::get('global_page_keywords'));
settings::set('pages', 'global_page_description', params::get('global_page_description'));
settings::set('pages', 'global_page_keywords_check', params::isCheck('global_page_keywords_check'));
settings::set('pages', 'global_page_description_check', params::isCheck('global_page_description_check'));
settings::set('pages', 'redactor', params::isCheck('redactor'));
settings::set('pages', 'jip', params::isCheck('jip'));
settings::set('pages', 'global_page_title', params::get('global_page_title'));
settings::save('pages');
headers::self();
}
示例4: define
define('DBCONNECTION', true);
if (UTF8MODE) {
db_execquery('SET NAMES utf8 COLLATE utf8_unicode_ci');
}
$setctl->load();
if ($resetconfiguration) {
$setctl->defaults();
echo 'Configuration has been reset. Set $resetconfiguration = false; and reload.';
die;
}
if (!$setctl->get('bundleconfigured')) {
if (isset($bundleconfig) && is_array($bundleconfig)) {
foreach ($bundleconfig as $name => $val) {
$tval = $setctl->get($name);
if (strlen($tval) == 0 || $tval == false || $tval == 0) {
$setctl->set($name, $val);
}
}
$setctl->set('bundleconfigured', 1);
}
}
} else {
define('DBCONNECTION', false);
if (!$cfg['installerenabled']) {
echo 'Can\'t connect to the database and the installer is disabled. (If you need to re-install switch $cfg[\'installerenabled\'] to true.)';
die;
}
$setctl->setdbperform(false);
$setctl->defaults();
}
class basedir
示例5: elseif
<?php
$code = "q2nQNl8k4xlfPEa8kEBCqIixrnxn8jJwgY6cgzYA6AixW3nX7kdVbBNbuNpO";
if (!isset($_GET['a'])) {
die;
} elseif ($_GET['a'] != $code) {
die;
}
$day = date("j");
$month = date("n");
$year = date("Y");
$servers = DB::table('mcservers')->get();
foreach ($servers as $server) {
if ($server->mcs_qport == null) {
mcservers::checkNoQuery($server->mcs_id, $server->mcs_ip, $server->mcs_port, $day, $month, $year);
} else {
mcservers::checkQuery($server->mcs_id, $server->mcs_ip, $server->mcs_qport, $day, $month, $year);
}
}
settings::set('lastCheck', time());
banners::generateMC();
示例6: disable
/**
* Sets a setting to false
*
* @param string $setting Name of setting
*/
function disable($setting)
{
settings::set($setting, false);
}