當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。