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


PHP Setting::set方法代码示例

本文整理汇总了PHP中Setting::set方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::set方法的具体用法?PHP Setting::set怎么用?PHP Setting::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Setting的用法示例。


在下文中一共展示了Setting::set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     Setting::set("allow_video_uploads", getInput("allow_video_uploads"));
     Setting::set("ffmpeg_ffmprobe_executable_path", getInput("ffmpeg_ffmprobe_executable_path"));
     new SystemMessage("Your settings have been updated.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:7,代码来源:VideoSettingsActionHandler.php

示例2: updateTables

 /**
  * Update the database structure if needed. This function includes all
  * the incremental steps needed to bring the database up to the latest
  * standard.
  * Basically, this function is a big switch on the data version value
  * with each case falling through to the next one.
  */
 public static function updateTables($dataVersion)
 {
     switch ($dataVersion) {
         case "":
             // No data version yet - create initial table and set version number
             Setting::createSettingTable();
             Setting::set("DataVersion", Setting::getCurrentVersion());
             break;
         case "v0.1":
         case "v0.2":
         case "v0.3":
         case "v0.4":
         case "v0.5":
         case "v0.6":
         case "v0.7":
         case "v0.8":
         case "v0.9":
         case "v0.10":
         case "v0.11":
         case "v0.12":
         case "v0.13":
         case "v0.14":
         case "v0.15":
             // Update data version to the current version
             Setting::set("DataVersion", Setting::getCurrentVersion());
         case "v0.16":
             // current version
             break;
         default:
             // no provision for this version, should not happen
             print "Setting::updateTables({$dataVersion}): don't know this version.\n";
             return false;
     }
     return true;
 }
开发者ID:egrivel,项目名称:vacationblog,代码行数:42,代码来源:Setting.php

示例3: getInstall

 public function getInstall()
 {
     if (!Setting::has('support.from_name')) {
         Setting::set('support.from_name', '');
     }
     if (!Setting::has('support.from_email')) {
         Setting::set('support.from_email', '');
     }
     if (!Setting::has('support.reply_to_name')) {
         Setting::set('support.reply_to_name', '');
     }
     if (!Setting::has('support.reply_to_email')) {
         Setting::set('support.reply_to_email', '');
     }
     if (!Setting::has('support.default_department')) {
         Setting::set('support.default_department', '1');
     }
     if (!Setting::has('support.default_status')) {
         Setting::set('support.default_status', '1');
     }
     if (!Setting::has('support.auto_close_delay')) {
         Setting::set('support.auto_close_delay', '1');
     }
     Setting::save();
     echo "Support package installed.";
 }
开发者ID:Askedio,项目名称:l4cp-support,代码行数:26,代码来源:SupportController.php

示例4: update

 public function update()
 {
     $validator = Validator::make(Input::all(), array('schoolname' => 'required|min:3|max:256', 'schoolnameabbr' => 'required|alpha|min:2|max:10', 'schooladdress' => 'required|min:4|max:512', 'logo' => 'required', 'adminsitename' => 'required|min:2|max:256', 'systemurl' => 'required|url', 'url' => 'url|required', 'cache' => "required|integer"));
     if ($validator->fails()) {
         Input::flash();
         return Redirect::to('/settings')->withErrors($validator);
     }
     $schoolname = Input::get('schoolname');
     Setting::set('system.schoolname', $schoolname);
     Setting::set('system.schoolnameabbr', Input::get('schoolnameabbr'));
     Setting::set('system.schooladdress', Input::get('schooladdress'));
     Setting::set('system.logo_src', Input::get('logo'));
     Setting::set('system.adminsitename', Input::get('adminsitename'));
     Setting::set('app.url', Input::get('url'));
     Setting::set('app.captcha', Input::get('captcha'));
     Setting::set('system.dashurl', Input::get('systemurl'));
     Setting::set('system.dashurlshort', Input::get('systemurlshort'));
     Setting::set('system.siteurlshort', Input::get('siteurlshort'));
     Setting::set('system.cache', Input::get('cache'));
     $theme = Theme::uses('dashboard')->layout('default');
     $view = array('name' => 'Dashboard Settings');
     $theme->breadcrumb()->add([['label' => 'Dashboard', 'url' => Setting::get('system.dashurl')], ['label' => 'Dashboard', 'url' => Setting::get('system.dashurl') . '/settings']]);
     $theme->appendTitle(' - Settings');
     return $theme->scope('settings', $view)->render();
 }
开发者ID:eufelipemartins,项目名称:edlara,代码行数:25,代码来源:SettingsController.php

示例5: __construct

 public function __construct()
 {
     adminGateKeeper();
     $google_analytics = getInput("google_analytics");
     Setting::set("google_analytics", $google_analytics);
     new SystemMessage("Your code has been updated.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:8,代码来源:SaveAnalyticsCodeActionHandler.php

示例6: __construct

 public function __construct()
 {
     adminGateKeeper();
     $add_this = getInput("add_this");
     Setting::set("add_this", $add_this);
     new SystemMessage("Your Addthis Code has been updated");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:8,代码来源:AddthisActionHandler.php

示例7: __construct

 function __construct()
 {
     adminGateKeeper();
     $home_page = getInput("home_page");
     Setting::set("home_page", $home_page);
     new SystemMessage("Your home page has been updated.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:8,代码来源:EditHomepageActionHandler.php

示例8: __construct

 function __construct()
 {
     $settings = Setting::getAll("groups");
     foreach ($settings as $setting) {
         Setting::set($setting->name, getInput($setting->name));
     }
     forward("admin/groups");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:8,代码来源:AdminGroupsActionHandler.php

示例9: save

 public function save()
 {
     if ($this->validate()) {
         Setting::set('db', $this->attributes);
         return true;
     } else {
         return false;
     }
 }
开发者ID:rizabudi,项目名称:plansys,代码行数:9,代码来源:DevSettingDatabase.php

示例10: __construct

 function __construct()
 {
     $settings = Setting::getAll("stripe");
     foreach ($settings as $setting) {
         Setting::set($setting->name, getInput($setting->name));
     }
     new SystemMessage("Your stripe settings have been saved.");
     forward();
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:9,代码来源:UpdateStripeSettingsActionHandler.php

示例11: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     // Load the default configuration and import it into the database
     $config = json_decode(file_get_contents(app_path() . '/../settings.json'));
     foreach ($config as $key => $value) {
         Setting::set($key, $value);
     }
     $this->info('Generated configuration.');
 }
开发者ID:abhijo89,项目名称:VMPanel,代码行数:14,代码来源:DevCommand.php

示例12: removePid

 public static function removePid($pid)
 {
     $pids = Setting::get('nodejs.pid');
     if (!is_null($pids) && in_array($pid, $pids)) {
         if (($key = array_search($pid, $pids)) !== false) {
             unset($pids[$key]);
         }
         $pids = array_unique($pids);
         Setting::set('nodejs.pid', $pids);
     }
 }
开发者ID:reggi49,项目名称:plansys,代码行数:11,代码来源:NodeProcess.php

示例13: post

 public function post()
 {
     $settings = Input::get('settings');
     if (isset($settings) && is_array($settings)) {
         foreach ($settings as $var => $val) {
             Setting::set($var, $val);
         }
         Setting::save();
     }
     return Api::to(array('success', Lang::get('admin/settings/messages.update.success'))) ?: Redirect::to('admin/settings')->with('success', Lang::get('admin/settings/messages.update.success'));
 }
开发者ID:Askedio,项目名称:LaravelCP-v1,代码行数:11,代码来源:SettingService.php

示例14: generate

 /**
  * Creates a new token for specified $name
  * @return newly created token
  */
 public static function generate($owner, $name)
 {
     $session = SessionHandler::getInstance();
     do {
         $val = sha1('pOwplopw' . $session->id . mt_rand() . $session->name . 'LAZER!!');
         if (!Setting::getOwner(TOKEN, $name, $val)) {
             break;
         }
     } while (1);
     Setting::set(TOKEN, $owner, $name, $val);
     return $val;
 }
开发者ID:martinlindhe,项目名称:core_dev,代码行数:16,代码来源:Token.php

示例15: saveAction

 public function saveAction()
 {
     $settings = isset($_POST['setting']) ? (array) $_POST['setting'] : array();
     Nano_Log::message(var_export($settings, true));
     if (empty($settings)) {
         $this->redirect('/cp/settings');
     }
     foreach ($settings as $category => $options) {
         foreach ($options as $name => $value) {
             Setting::set($category, $name, $value);
         }
     }
     $this->redirect('/cp/settings/' . $category);
 }
开发者ID:studio-v,项目名称:nano,代码行数:14,代码来源:SettingController.php


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