當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Configuration::populate方法代碼示例

本文整理匯總了PHP中Configuration::populate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Configuration::populate方法的具體用法?PHP Configuration::populate怎麽用?PHP Configuration::populate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Configuration的用法示例。


在下文中一共展示了Configuration::populate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getAll

 public function getAll()
 {
     if (!isset($_SESSION['configuration'])) {
         $configurationManager = new Configuration();
         $configs = $configurationManager->populate();
         $confTab = array();
         foreach ($configs as $config) {
             $this->confTab[$config->getKey()] = $config->getValue();
         }
         $_SESSION['configuration'] = serialize($this->confTab);
     } else {
         $this->confTab = unserialize($_SESSION['configuration']);
     }
 }
開發者ID:Chouchen,項目名稱:Leed,代碼行數:14,代碼來源:Configuration.class.php

示例2: getAll

 public function getAll()
 {
     if (!isset($_SESSION['configuration'])) {
         $configurationManager = new Configuration();
         $configs = $configurationManager->populate();
         $confTab = array();
         foreach ($configs as $config) {
             $ns = 'conf';
             $key = $config->getKey();
             $infos = explode(':', $key);
             if (count($infos) == 2) {
                 list($ns, $key) = $infos;
             }
             $this->confTab[$ns][$key] = $config->getValue();
         }
         $_SESSION['configuration'] = serialize($this->confTab);
     } else {
         $this->confTab = unserialize($_SESSION['configuration']);
     }
 }
開發者ID:thib3113,項目名稱:yana-server,代碼行數:20,代碼來源:Configuration.class.php

示例3: preference_plugin_page

function preference_plugin_page()
{
    global $myUser, $_;
    if (isset($_['section']) && $_['section'] == 'preference' || !isset($_['section'])) {
        if ($myUser != false) {
            ?>

		<div class="span9 userBloc">
		<h1>Préférence</h1>
		<p>Gestion des préférences du programme</p>

		<ul class="nav nav-tabs">
			<li <?php 
            echo isset($_['block']) && $_['block'] == 'global' ? 'class="active"' : '';
            ?>
 ><a href="setting.php?section=preference&amp;block=global"><i class="fa fa-angle-right"></i> Général</a></li>
	       <?php 
            Plugin::callHook("preference_menu", array());
            ?>
	    </ul>
			
		
		 <?php 
            if (isset($_['section']) && $_['section'] == 'preference' && @$_['block'] == 'global' || !isset($_['section'])) {
                if ($myUser != false) {
                    ?>

					<div class="span9 userBloc">
							<table class="table table-striped table-bordered" id="setting_table">
							<tr><th>Clé</th><th>Valeur</th><tr>
							<?php 
                    $conf = new Configuration();
                    $confs = $conf->populate();
                    foreach ($confs as $value) {
                        $ns = 'conf';
                        $key = $value->getKey();
                        $infos = explode(':', $key);
                        if (count($infos) == 2) {
                            list($ns, $key) = $infos;
                        }
                        if ($ns != 'conf') {
                            continue;
                        }
                        echo '<tr><td>' . $key . '</td><td><input class="input-xxlarge" type="text" value="' . $value->getValue() . '" id="' . $value->getId() . '"></td></tr>';
                    }
                    ?>
							<tr><td colspan="2"><button type="submit" onclick="save_settings();" class="btn">Modifier</button></td></tr>
							</table>
						
					</div>

					<?php 
                } else {
                    ?>

					<div id="main" class="wrapper clearfix">
						<article>
							<h3>Vous devez être connecté</h3>
						</article>
					</div>
					<?php 
                }
            }
            Plugin::callHook("preference_content", array());
            ?>
		</div>

<?php 
        } else {
            ?>

		<div id="main" class="wrapper clearfix">
			<article>
					<h3>Vous devez être connecté</h3>
			</article>
		</div>
<?php 
        }
    }
}
開發者ID:kofeve,項目名稱:yana-server,代碼行數:80,代碼來源:preference.plugin.enabled.php


注:本文中的Configuration::populate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。