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


PHP owa_coreAPI::configSingleton方法代码示例

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


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

示例1: __construct

 /**
  * Base Constructor
  *
  * @return owa_base
  */
 function __construct()
 {
     owa_coreAPI::profile($this, __FUNCTION__, __LINE__);
     $this->e =& owa_coreAPI::errorSingleton();
     $this->c =& owa_coreAPI::configSingleton();
     $this->config = $this->c->fetch('base');
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:12,代码来源:owa_base.php

示例2: action

 function action()
 {
     $config = owa_coreAPI::configSingleton();
     $ret = $config->reset($this->get('module'));
     if ($ret) {
         $this->e->notice($this->getMsg(2503));
         $this->setStatusCode(2503);
     }
     $this->setRedirectAction('base.optionsGeneral');
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:10,代码来源:optionsReset.php

示例3: __construct

 function __construct()
 {
     $c = owa_coreAPI::configSingleton();
     $this->config = $c->fetch('base');
     $this->e = owa_coreAPI::errorSingleton();
     $this->crawler = new owa_http();
     $this->crawler->read_timeout = 20;
     $this->cache_dir = '';
     $this->date_format = "F j, Y";
     $this->CDATA = 'content';
     $this->items_limit = 3;
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:12,代码来源:owa_news.php

示例4: __construct

 function __construct()
 {
     $c =& owa_coreAPI::configSingleton();
     $this->config = $c->fetch('base');
     $this->e =& owa_coreAPI::errorSingleton();
     $this->crawler = new Snoopy();
     // do not allow snoopy to follow links
     $this->crawler->maxredirs = 5;
     $this->crawler->agent = owa_coreAPI::getSetting('base', 'owa_user_agent');
     //$this->crawler->agent = "Firefox";
     //owa_coreAPI::debug('hello from owa_http constructor');
     return;
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:13,代码来源:owa_httpRequest.php

示例5: __construct

 function __construct($module = null, $caller_params = array())
 {
     $this->caller_params = $caller_params;
     $c = owa_coreAPI::configSingleton();
     $this->config = $c->fetch('base');
     $this->e = owa_coreAPI::errorSingleton();
     // set template dirs
     if (!empty($caller_params['module'])) {
         $this->_setTemplateDir($module);
     } else {
         $this->_setTemplateDir('base');
     }
     $this->time_now = owa_lib::time_now();
 }
开发者ID:arineng,项目名称:Open-Web-Analytics,代码行数:14,代码来源:owa_template.php

示例6: action

 function action()
 {
     $c = owa_coreAPI::configSingleton();
     $config_values = $this->get('config');
     if (!empty($config_values)) {
         foreach ($config_values as $k => $v) {
             list($module, $name) = explode('.', $k);
             if ($module && $name) {
                 $c->persistSetting($module, $name, $v);
             }
         }
         $c->save();
         owa_coreAPI::notice("Configuration changes saved to database.");
         $this->setStatusCode(2500);
     }
     $this->setRedirectAction('base.optionsGeneral');
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:17,代码来源:optionsUpdate.php

示例7: getActiveModules

 public static function getActiveModules()
 {
     $c = owa_coreAPI::configSingleton();
     $config = $c->config->get('settings');
     $active_modules = array();
     foreach ($config as $k => $module) {
         if (isset($module['is_active']) && $module['is_active'] == true) {
             $active_modules[] = $k;
         }
     }
     return $active_modules;
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:12,代码来源:owa_coreAPI.php

示例8: setCookieDomain

 function setCookieDomain($domain)
 {
     if (!empty($domain)) {
         $c =& owa_coreAPI::configSingleton();
         // sanitizes the domain
         $c->setCookieDomain($domain);
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:8,代码来源:client.php

示例9: redirectToView

 /**
  * redirects borwser to a particular view
  *
  * @param unknown_type $data
  */
 public static function redirectToView($data)
 {
     //print_r($data);
     $c = owa_coreAPI::configSingleton();
     $config = $c->fetch('base');
     $control_params = array('view_method', 'auth_status');
     $get = '';
     foreach ($data as $n => $v) {
         if (!in_array($n, $control_params)) {
             $get .= $config['ns'] . $n . '=' . $v . '&';
         }
     }
     $new_url = sprintf($config['link_template'], $config['main_url'], $get);
     owa_lib::redirectBrowser($new_url);
 }
开发者ID:arineng,项目名称:Open-Web-Analytics,代码行数:20,代码来源:owa_lib.php

示例10: make_mail_logger

 /**
  * Builds a logger that sends lines via email
  *
  * @return unknown
  */
 function make_mail_logger()
 {
     // fetch config object
     $c =& owa_coreAPI::configSingleton();
     $conf = array('subject' => 'Important Error Log Events', 'from' => 'OWA-Error-Logger');
     $logger = Log::singleton('mail', owa_coreAPI::getSetting('base', 'notice_email'), getmypid(), $conf);
     return $logger;
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:13,代码来源:error.php

示例11: __construct

 /**
  * Creates an instance of the settings class.
  **/
 function __construct()
 {
     $this->config = owa_coreAPI::configSingleton();
     $this->moduleName = 'ecoinsight';
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:8,代码来源:appSettings.php

示例12:

 /**
  * Alternate Constructor for base module settings
  * Needed for backwards compatability with older classes
  * 
  */
 function &get_settings($id = 1)
 {
     static $config2;
     if (!isset($config2)) {
         //print 'hello from alt constructor';
         $config2 = owa_coreAPI::configSingleton();
     }
     return $config2->fetch('base');
 }
开发者ID:rgaviras,项目名称:Open-Web-Analytics,代码行数:14,代码来源:settings.php


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