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


PHP Configuration::setArray方法代码示例

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


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

示例1: __construct

 /**
  * The Symphony constructor initialises the class variables of Symphony.
  * It will set the DateTime settings, define new date constants and initialise
  * the correct Language for the currently logged in Author. If magic quotes
  * are enabled, Symphony will sanitize the `$_SERVER`, `$_COOKIE`,
  * `$_GET` and `$_POST` arrays. The constructor loads in
  * the initial Configuration values from the `CONFIG` file
  */
 protected function __construct()
 {
     $this->Profiler = Profiler::instance();
     $this->Profiler->sample('Engine Initialisation');
     if (get_magic_quotes_gpc()) {
         General::cleanArray($_SERVER);
         General::cleanArray($_COOKIE);
         General::cleanArray($_GET);
         General::cleanArray($_POST);
     }
     // Includes the existing CONFIG file and initialises the Configuration
     // by setting the values with the setArray function.
     include CONFIG;
     self::$Configuration = new Configuration(true);
     self::$Configuration->setArray($settings);
     DateTimeObj::setDefaultTimezone(self::$Configuration->get('timezone', 'region'));
     define_safe('__SYM_DATE_FORMAT__', self::$Configuration->get('date_format', 'region'));
     define_safe('__SYM_TIME_FORMAT__', self::$Configuration->get('time_format', 'region'));
     define_safe('__SYM_DATETIME_FORMAT__', __SYM_DATE_FORMAT__ . self::$Configuration->get('datetime_separator', 'region') . __SYM_TIME_FORMAT__);
     // Initialize language management
     Lang::initialize();
     $this->initialiseLog();
     GenericExceptionHandler::initialise(self::$Log);
     GenericErrorHandler::initialise(self::$Log, self::$Configuration->get('strict_error_handling', 'symphony'));
     $this->initialiseDatabase();
     $this->initialiseExtensionManager();
     $this->initialiseCookie();
     // If the user is not a logged in Author, turn off the verbose error
     // messages.
     if (!self::isLoggedIn() && is_null($this->Author)) {
         GenericExceptionHandler::$enabled = false;
     }
     // Set system language
     Lang::set(self::$Configuration->get('lang', 'symphony'));
 }
开发者ID:scottkf,项目名称:keepflippin--on-symphony,代码行数:43,代码来源:class.symphony.php

示例2: initialiseConfiguration

 /**
  * Setter for `$Configuration`. This function initialise the configuration
  * object and populate its properties based on the given $array.
  *
  * @since Symphony 2.3
  * @param array $data
  *  An array of settings to be stored into the Configuration object
  */
 public function initialiseConfiguration(array $data = array())
 {
     if (empty($data)) {
         // Includes the existing CONFIG file and initialises the Configuration
         // by setting the values with the setArray function.
         include CONFIG;
         $data = $settings;
     }
     self::$Configuration = new Configuration(true);
     self::$Configuration->setArray($data);
 }
开发者ID:readona,项目名称:symphonyno5,代码行数:19,代码来源:class.symphony.php

示例3: initialiseConfiguration

 /**
  * Setter for `$Configuration`. This function initialise the configuration
  * object and populate its properties based on the given `$array`. Since
  * Symphony 2.6.5, it will also set Symphony's date constants.
  *
  * @since Symphony 2.3
  * @param array $data
  *  An array of settings to be stored into the Configuration object
  */
 public static function initialiseConfiguration(array $data = array())
 {
     if (empty($data)) {
         // Includes the existing CONFIG file and initialises the Configuration
         // by setting the values with the setArray function.
         include CONFIG;
         $data = $settings;
     }
     self::$Configuration = new Configuration(true);
     self::$Configuration->setArray($data);
     // Set date format throughout the system
     define_safe('__SYM_DATE_FORMAT__', self::Configuration()->get('date_format', 'region'));
     define_safe('__SYM_TIME_FORMAT__', self::Configuration()->get('time_format', 'region'));
     define_safe('__SYM_DATETIME_FORMAT__', __SYM_DATE_FORMAT__ . self::Configuration()->get('datetime_separator', 'region') . __SYM_TIME_FORMAT__);
     DateTimeObj::setSettings(self::Configuration()->get('region'));
 }
开发者ID:hotdoy,项目名称:EDclock,代码行数:25,代码来源:class.symphony.php


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