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


PHP Settings::get_all方法代碼示例

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


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

示例1: settings

 public function settings()
 {
     $settings = array();
     $first = TRUE;
     foreach ($this->settings->get_all() as $setting) {
         $settings[] = array('id' => $setting->id(), 'title' => $setting->title, 'active' => $first, 'view' => $setting->view());
         $first = FALSE;
     }
     return $settings;
 }
開發者ID:modulargaming,項目名稱:user,代碼行數:10,代碼來源:Settings.php

示例2: get

 static function get($option)
 {
     if (empty(static::$settings) === true) {
         Settings::get_all();
         if (empty(static::$settings) === false && key_exists($option, static::$settings)) {
             return static::$settings[$option];
         }
     }
     if (key_exists($option, static::$settings)) {
         return static::$settings[$option];
     }
 }
開發者ID:aircross,項目名稱:MeeLa-Premium-URL-Shortener,代碼行數:12,代碼來源:settings.php

示例3: _self_doc

 /**
  * Returns a PluginDoc array that PyroCMS uses 
  * to build the reference in the admin panel
  *
  * @return array
  */
 public function _self_doc()
 {
     $info = array();
     // dynamically build the array for the magic method __call
     $settings = Settings::get_all();
     ksort($settings);
     foreach ($settings as $slug => $value) {
         $info[$slug]['description'] = array('en' => 'Retrieve the value for setting ' . $slug . '.', 'br' => 'Recupera o valor da configuração "' . $slug . '".');
         $info[$slug]['single'] = true;
         $info[$slug]['double'] = false;
         $info[$slug]['variables'] = '';
         $info[$slug]['params'] = array();
     }
     return $info;
 }
開發者ID:rishikeshwalawalkar,項目名稱:GetARide,代碼行數:21,代碼來源:plugin.php

示例4: action_index

 public function action_index()
 {
     $data['settings'] = Settings::get_all();
     if (\Input::method() == 'POST') {
         Controller_Settings::update(Input::Post());
         $data['settings'] = Settings::get_all(true);
     }
     $data['blocked'] = $blacklist_item = Model_Blacklist::query()->get();
     $keys = \Settings::Get('character_set');
     if (empty($keys) === true) {
         $keys = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
     }
     $random_length = \Settings::Get('random_url_length');
     if (empty($random_length) === true) {
         $random_length = 5;
     }
     $url_sample_space = DB::select(DB::expr('count(id) as count'))->from('urls')->where(DB::expr('char_length(short_url)'), $random_length)->limit(1)->execute()->as_array();
     $data['urls_left'] = Controller_Admin::mathFact(strlen($keys)) / (Controller_Admin::mathFact(strlen($keys) - $random_length) * Controller_Admin::mathFact($random_length)) - $url_sample_space[0]['count'];
     $this->template->content = View::Forge('admin/index', $data);
 }
開發者ID:aircross,項目名稱:MeeLa-Premium-URL-Shortener,代碼行數:20,代碼來源:admin.php

示例5: catch

                /* Succes message instellen. */
                $_SESSION['settings']['success'] = 'De settings zijn opgeslagen.';
                /* Javascript gebruiken om de pagina te 'refreshen'. */
                echo '<script>window.location = \'./operator_instellingen\';</script>';
                /* Exit het script, zodat er direct geredirect wordt. */
                exit;
            } catch (Exception $e) {
                /* Foutmelding gevangen, sla deze op. */
                $errorMessage = $e->getMessage();
            }
        }
    }
    /* Probeer onderstaande. */
    try {
        /* Probeer alle settings op te halen. */
        $settings = Settings::get_all();
    } catch (Exception $e) {
        /* Foutmelding gevangen, kijken of er al 1 bestaat. */
        if (!empty($errorMessage)) {
            /* Er bestaat al een foutmelding, dus voeg deze eraan toe. */
            $errorMessage .= '<br />' . $e->getMessage();
        } else {
            /* Nog geen foutmelding, dus sla deze op. */
            $errorMessage = $e->getMessage();
        }
    }
}
?>
<style>
	
	.table input[type="text"] {
開發者ID:roaldnefs,項目名稱:parkingcity,代碼行數:31,代碼來源:settings.php


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