本文整理汇总了PHP中Settings::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::getAll方法的具体用法?PHP Settings::getAll怎么用?PHP Settings::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings
的用法示例。
在下文中一共展示了Settings::getAll方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
// Get all settings
Shineisp_Registry::set('Settings', Settings::getAll());
// Statuses are used everywhere in system, so we need to make just one query
Shineisp_Registry::set('Status', Statuses::getAll());
}
示例2: assign
public static function assign(&$var)
{
$all = Settings::getAll();
if (is_array($all)) {
if (is_object($var)) {
foreach ($all as $row) {
$normalized_name = Settings::_normalizeName($row['name']);
if (!is_array($row['value'])) {
$var->{$normalized_name} = html_entity_decode($row['value']);
} else {
$var->{$normalized_name} = $row['value'];
}
}
} else {
foreach ($all as $row) {
$normalized_name = Settings::_normalizeName($row['name']);
if (!is_array($row['value'])) {
$var->{$normalized_name} = html_entity_decode($row['value']);
} else {
$var->{$normalized_name} = $row['value'];
}
}
}
}
}
示例3: defaultAction
public function defaultAction()
{
if (!Auth::isAdmin()) {
$this->accessDenied();
return;
}
$pages = new Pages();
$this->view->assign('pagetree', $pages->getChildren());
$this->view->assign('settings', Settings::getAll());
}
示例4: foreach
<?php
if ($config->isPOST()) {
foreach ($_POST as $post => $value) {
$set = explode('_', $post);
if (is_array($set)) {
$conf = new Settings($set[1]);
$conf->value = $value;
$conf->save();
}
}
Messages::addNotice('Settings successfully saved.');
jump('index.php?page=settings');
}
$conf = new Settings();
$smarty->assign('settings', $conf->getAll());
示例5: Settings
$s = new Settings("gisicle.json");
session_start();
define("USERNAME_BACKEND", "admin");
define("PASSWORD_BACKEND", "admin");
$f->dispHead();
if (isset($_GET["exit"])) {
unset($_SESSION["login"]);
}
if (isset($_POST["username"]) && isset($_POST["password"])) {
if ($_POST["username"] == USERNAME_BACKEND && $_POST["password"] == PASSWORD_BACKEND) {
$_SESSION["login"] = 1;
} else {
$f->dispLoginError();
}
}
if (isset($_SESSION["login"])) {
if (isset($_POST["gifsicle_settings"])) {
$PostAr = $_POST;
unset($PostAr["gifsicle_settings"]);
foreach ($PostAr as $key => $value) {
$s->set($key, $value);
}
}
if (isset($_GET["clear"])) {
$g->clearCache();
}
$f->dispAdminPage($g->nbAndSize(), $s->getAll());
} else {
$f->dispLoginForm();
}
$f->dispFoot();