当前位置: 首页>>代码示例>>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;未经允许,请勿转载。