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


PHP Conf::getConf方法代码示例

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


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

示例1: __construct

 public function __construct($item)
 {
     if (empty($item)) {
         return $item;
     }
     $dbConf = Conf::getConf('/db/mysql/' . $item);
     $this->log = Log::getInstance('mysql');
     $this->connect($dbConf["hostname"], $dbConf["username"], $dbConf["password"], $dbConf["database"], $dbConf["pconnect"]);
 }
开发者ID:Tianxing,项目名称:ksite,代码行数:9,代码来源:Mysql.php

示例2: getInstance

 public static function getInstance($name = '')
 {
     if (!$name) {
         $name = APP_NAME;
     }
     if (!self::$logId) {
         self::getLogId();
     }
     if (!empty(self::$instance[$name])) {
         return self::$instance[$name];
     }
     $logConf = Conf::getConf("/log/{$name}");
     if (!isset($logConf['logLevel']) || !$logConf['logLevel']) {
         $logConf['logLevel'] = Conf::getConf("/log/logLevel");
     }
     if (!isset($logConf['logLevel']) || !$logConf['logLevel']) {
         $logConf['logLevel'] = self::LOG_LEVEL_NOTICE;
     }
     if (!isset($logConf['file']) || !$logConf['file']) {
         $logConf['file'] = LOG_PATH . '/' . $name . '.log';
     }
     self::$instance[$name] = new Log($logConf);
     return self::$instance[$name];
 }
开发者ID:Tianxing,项目名称:ksite,代码行数:24,代码来源:Log.php

示例3: Sphinx

 function Sphinx($name)
 {
     $sphinxConf = Conf::getConf('/sphinx/' . $name);
     $log = Log::getInstance('sphinx');
     if (!$sphinxConf) {
         $log->warning('Sphinx not in conf, Name:' . $name);
         return false;
     }
     if (!$sphinxConf['host'] || !$sphinxConf['port']) {
         $log->warning('Sphinx Conf must have host and port');
         return false;
     }
     $this->_host = $sphinxConf['host'];
     $this->_port = $sphinxConf['port'];
     $this->_path = false;
     $this->_socket = false;
     // per-query settings
     $this->_offset = 0;
     $this->_limit = 20;
     $this->_mode = SPH_MATCH_ALL;
     $this->_weights = array();
     $this->_sort = SPH_SORT_RELEVANCE;
     $this->_sortby = "";
     $this->_min_id = 0;
     $this->_max_id = 0;
     $this->_filters = array();
     $this->_groupby = "";
     $this->_groupfunc = SPH_GROUPBY_DAY;
     $this->_groupsort = "@group desc";
     $this->_groupdistinct = "";
     $this->_maxmatches = 1000;
     $this->_cutoff = 0;
     $this->_retrycount = 0;
     $this->_retrydelay = 0;
     $this->_anchor = array();
     $this->_indexweights = array();
     $this->_ranker = SPH_RANK_PROXIMITY_BM25;
     $this->_maxquerytime = 0;
     $this->_fieldweights = array();
     $this->_overrides = array();
     $this->_select = "*";
     $this->_error = "";
     // per-reply fields (for single-query case)
     $this->_warning = "";
     $this->_connerror = false;
     $this->_reqs = array();
     // requests storage (for multi-query case)
     $this->_mbenc = "";
     $this->_arrayresult = false;
     $this->_timeout = 0;
 }
开发者ID:Tianxing,项目名称:ksite,代码行数:51,代码来源:Sphinx.php


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