当前位置: 首页>>代码示例>>PHP>>正文


PHP Settings::getAll方法代码示例

本文整理汇总了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());
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:7,代码来源:Common.php

示例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'];
                 }
             }
         }
     }
 }
开发者ID:mbassan,项目名称:backstage2,代码行数:25,代码来源:Settings.php

示例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());
 }
开发者ID:pixelproduction,项目名称:PixelManagerCMS,代码行数:10,代码来源:Settings.php

示例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());
开发者ID:robertpop,项目名称:NS,代码行数:16,代码来源:settings.php

示例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();
开发者ID:apcros,项目名称:Lighmblr,代码行数:31,代码来源:admin.php


注:本文中的Settings::getAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。