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


PHP Configuration::setValue方法代码示例

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


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

示例1: add

 public function add($key, $value, $ns = 'conf')
 {
     $config = new Configuration();
     $config->setKey($ns . ':' . $key);
     $config->setValue($value);
     $config->save();
     $this->confTab[$ns][$key] = $value;
     unset($_SESSION['configuration']);
 }
开发者ID:thib3113,项目名称:yana-server,代码行数:9,代码来源:Configuration.class.php

示例2: set

 /**
  * @static
  * @param $name
  * @param $value
  * @return void
  */
 public static function set($name, $value = null)
 {
     $configuration = ConfigurationPeer::retrieveByName($name);
     if (!$configuration) {
         $configuration = new Configuration();
         $configuration->setName($name);
     }
     $configuration->setValue($value);
     $configuration->save();
 }
开发者ID:ratibus,项目名称:Crew,代码行数:16,代码来源:Configuration.php

示例3: save

 /**
  * The function saves configuration values.
  * 
  * @access private
  */
 private function save()
 {
     if (isset($_POST['submit'])) {
         if (isset($_POST['Config']) && is_array($_POST['Config'])) {
             foreach ($_POST['Config'] as $key => $value) {
                 Configuration::setValue($key, $value);
             }
         }
         $this->halt();
     }
 }
开发者ID:vosaan,项目名称:ankor.local,代码行数:16,代码来源:settings.php

示例4: saveForStorage

 private function saveForStorage()
 {
     $tmp = Configuration::getValue('project_' . $this->projectId);
     $tmp['b24connect'] = $this->resource;
     if (isset($tmp['info']['USERINFO'])) {
         $tmp['info']['USERINFO'] = array('access_token' => $this->resource['access_token'], 'refresh_token' => $this->resource['refresh_token'], 'expires_in' => $this->resource['expires_in'], 'domain' => $tmp['info']['USERINFO']['domain'], 'member_id' => $tmp['info']['USERINFO']['member_id']);
     } else {
         $tmp['info']['USERINFO'] = array('access_token' => $this->resource['access_token'], 'refresh_token' => $this->resource['refresh_token'], 'expires_in' => $this->resource['expires_in'], 'domain' => 'null', 'member_id' => 'null');
     }
     Configuration::setValue('project_' . $this->projectId, $tmp);
 }
开发者ID:Okhremchuk,项目名称:Ingenum,代码行数:11,代码来源:class.ShBitrix24.php

示例5: change

 /**
  * The departments edit handler.
  * 
  * @access public
  * @return string The HTML code.
  */
 public function change()
 {
     if (isset($_POST['submit'])) {
         if (isset($_POST['Depart'])) {
             $arr = array();
             foreach ($_POST['Depart']['Name'] as $i => $value) {
                 if ($value) {
                     $arr['Name'][$i] = $value;
                     $arr['Email'][$i] = $_POST['Depart']['Email'][$i];
                 }
             }
             $_POST['Config']['contact/departs'] = $arr;
         }
         if (isset($_POST['Config']) && is_array($_POST['Config'])) {
             foreach ($_POST['Config'] as $key => $value) {
                 Configuration::setValue($key, $value);
             }
         }
         return $this->halt();
     }
     return $this->getView()->render();
 }
开发者ID:vosaan,项目名称:ankor.local,代码行数:28,代码来源:contacts.php

示例6: testGetChildrenByInitWithSimpleXmlElement

 /**
  * Test if a configuration init with a SimpleXMLElement
  * has been added correctly.
  *
  * @return void
  */
 public function testGetChildrenByInitWithSimpleXmlElement()
 {
     $this->configuration->init($this->getTestNode('test', 'testValue'));
     $toBeTested = new Configuration('testNode');
     $toBeTested->setAttr('test');
     $toBeTested->setValue('testValue');
     $this->assertEquals(array($toBeTested), $this->configuration->getChildren());
 }
开发者ID:appserver-io,项目名称:configuration,代码行数:14,代码来源:ConfigurationTest.php


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