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


PHP owa_coreAPI::getSetting方法代码示例

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


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

示例1: __construct

 function __construct()
 {
     $columns = array();
     $columns['id'] = new owa_dbColumn('id', OWA_DTD_BIGINT);
     $columns['id']->setPrimaryKey();
     $columns['visitor_id'] = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT);
     $columns['visitor_id']->setForeignKey('base.visitor');
     $columns['session_id'] = new owa_dbColumn('session_id', OWA_DTD_BIGINT);
     $columns['session_id']->setForeignKey('base.session');
     $columns['session_id']->setIndex();
     $columns['site_id'] = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255);
     $columns['site_id']->setForeignKey('base.site', 'site_id');
     $columns['site_id']->setIndex();
     $columns['referer_id'] = new owa_dbColumn('referer_id', OWA_DTD_BIGINT);
     $columns['referer_id']->setForeignKey('base.referer');
     $columns['ua_id'] = new owa_dbColumn('ua_id', OWA_DTD_BIGINT);
     $columns['ua_id']->setForeignKey('base.ua');
     $columns['host_id'] = new owa_dbColumn('host_id', OWA_DTD_BIGINT);
     $columns['host_id']->setForeignKey('base.host');
     $columns['os_id'] = new owa_dbColumn('os_id', OWA_DTD_BIGINT);
     $columns['os_id']->setForeignKey('base.os');
     $columns['location_id'] = new owa_dbColumn('location_id', OWA_DTD_BIGINT);
     $columns['location_id']->setForeignKey('base.location_dim');
     $columns['referring_search_term_id'] = new owa_dbColumn('referring_search_term_id', OWA_DTD_BIGINT);
     $columns['referring_search_term_id']->setForeignKey('base.search_term_dim');
     $columns['timestamp'] = new owa_dbColumn('timestamp', OWA_DTD_INT);
     $columns['yyyymmdd'] = new owa_dbColumn('yyyymmdd', OWA_DTD_INT);
     $columns['yyyymmdd']->setIndex();
     $columns['year'] = new owa_dbColumn('year', OWA_DTD_INT);
     $columns['month'] = new owa_dbColumn('month', OWA_DTD_INT);
     $columns['day'] = new owa_dbColumn('day', OWA_DTD_TINYINT2);
     $columns['dayofweek'] = new owa_dbColumn('dayofweek', OWA_DTD_VARCHAR10);
     $columns['dayofyear'] = new owa_dbColumn('dayofyear', OWA_DTD_INT);
     $columns['weekofyear'] = new owa_dbColumn('weekofyear', OWA_DTD_INT);
     $columns['last_req'] = new owa_dbColumn('last_req', OWA_DTD_BIGINT);
     $columns['ip_address'] = new owa_dbColumn('ip_address', OWA_DTD_VARCHAR255);
     $columns['is_new_visitor'] = new owa_dbColumn('is_new_visitor', OWA_DTD_BOOLEAN);
     $columns['is_repeat_visitor'] = new owa_dbColumn('is_repeat_visitor', OWA_DTD_BOOLEAN);
     $columns['language'] = new owa_dbColumn('language', OWA_DTD_VARCHAR255);
     $columns['days_since_prior_session'] = new owa_dbColumn('days_since_prior_session', OWA_DTD_INT);
     $columns['days_since_first_session'] = new owa_dbColumn('days_since_first_session', OWA_DTD_INT);
     $columns['num_prior_sessions'] = new owa_dbColumn('num_prior_sessions', OWA_DTD_INT);
     $columns['medium'] = new owa_dbColumn('medium', OWA_DTD_VARCHAR255);
     $columns['source_id'] = new owa_dbColumn('source_id', OWA_DTD_BIGINT);
     $columns['source_id']->setForeignKey('base.source_dim');
     $columns['ad_id'] = new owa_dbColumn('ad_id', OWA_DTD_BIGINT);
     $columns['ad_id']->setForeignKey('base.ad_dim');
     $columns['campaign_id'] = new owa_dbColumn('campaign_id', OWA_DTD_BIGINT);
     $columns['campaign_id']->setForeignKey('base.campaign_dim');
     $columns['user_name'] = new owa_dbColumn('user_name', OWA_DTD_VARCHAR255);
     // custom variable columns
     $cv_max = owa_coreAPI::getSetting('base', 'maxCustomVars');
     for ($i = 1; $i <= $cv_max; $i++) {
         $cvar_name_col = 'cv' . $i . '_name';
         $columns[$cvar_name_col] = new owa_dbColumn($cvar_name_col, OWA_DTD_VARCHAR255);
         $cvar_value_col = 'cv' . $i . '_value';
         $columns[$cvar_value_col] = new owa_dbColumn($cvar_value_col, OWA_DTD_VARCHAR255);
     }
     return $columns;
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:60,代码来源:factTable.php

示例2: render

 function render($data)
 {
     // load body template
     $this->t->set_template('wrapper_blank.tpl');
     // check to see if we should log clicks.
     if (!owa_coreAPI::getSetting('base', 'log_dom_clicks')) {
         $this->body->set('do_not_log_clicks', true);
     }
     // check to see if we should log clicks.
     if (!owa_coreAPI::getSetting('base', 'log_dom_stream')) {
         $this->body->set('do_not_log_domstream', true);
     }
     //set siteId variable name to support old style owa_params js object
     $this->body->set("site_id", "owa_params['site_id']");
     // set name of javascript object containing params that need to be logged
     // depricated, but needed to support old style tags
     $this->body->set("owa_params", true);
     // load body template
     $this->body->set_template('js_logger.tpl');
     // assemble JS libs
     $this->setJs('json2', 'base/js/includes/json2.js');
     $this->setJs('lazyload', 'base/js/includes/lazyload-2.0.min.js');
     $this->setJs('owa', 'base/js/owa.js');
     $this->setJs('owa.tracker', 'base/js/owa.tracker.js');
     //$this->setJs('url_encode', 'base/js/includes/url_encode.js');
     $this->concatinateJs();
     return;
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:28,代码来源:jsLogLib.php

示例3: __construct

 /**
  * Constructor
  *
  * @return owa_mailer
  */
 function __construct()
 {
     parent::__construct();
     $this->mailer = new PHPMailer();
     if (owa_coreAPI::getSetting('base', 'mailer-from')) {
         $this->mailer->From = owa_coreAPI::getSetting('base', 'mailer-from');
     }
     if (owa_coreAPI::getSetting('base', 'mailer-fromName')) {
         $this->mailer->FromName = owa_coreAPI::getSetting('base', 'mailer-fromName');
     }
     if (owa_coreAPI::getSetting('base', 'mailer-use-smtp')) {
         $this->mailer->IsSMTP();
         // telling the class to use SMTP
         if (owa_coreAPI::getSetting('base', 'mailer-host')) {
             $this->mailer->Host = owa_coreAPI::getSetting('base', 'mailer-host');
         }
         if (owa_coreAPI::getSetting('base', 'mailer-port')) {
             $this->mailer->Port = owa_coreAPI::getSetting('base', 'mailer-port');
         }
         if (owa_coreAPI::getSetting('base', 'mailer-smtpAuth')) {
             $this->mailer->SMTPAuth = owa_coreAPI::getSetting('base', 'mailer-smtpAuth');
         }
         if (owa_coreAPI::getSetting('base', 'mailer-username') && owa_coreAPI::getSetting('base', 'mailer-password')) {
             $this->mailer->Username = owa_coreAPI::getSetting('base', 'mailer-username');
             $this->mailer->Password = owa_coreAPI::getSetting('base', 'mailer-password');
         }
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:33,代码来源:mailer.php

示例4: action

 function action()
 {
     if ($this->getParam('source')) {
         $input_queue_type = $this->getParam('source');
     } else {
         $input_queue_type = owa_coreAPI::getSetting('base', 'event_queue_type');
     }
     $processing_queue_type = $this->getParam('destination');
     if (!$processing_queue_type) {
         $processing_queue_type = owa_coreAPI::getSetting('base', 'event_secondary_queue_type');
     }
     // switch event queue setting in case a new events should be sent to a different type of queue.
     // this is handy for when processing from a file queue to a database queue
     if ($processing_queue_type) {
         owa_coreAPI::setSetting('base', 'event_queue_type', $processing_queue_type);
         owa_coreAPI::debug("Setting event queue type to {$processing_queue_type} for processing.");
     }
     $d = owa_coreAPI::getEventDispatch();
     owa_coreAPI::debug("Loading {$input_queue_type} event queue.");
     $q = $d->getAsyncEventQueue($input_queue_type);
     $ret = $q->processQueue();
     // go ahead and process the secondary event queue
     if ($ret && $processing_queue_type) {
         $destq = $d->getAsyncEventQueue($processing_queue_type);
         $destq->processQueue();
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:27,代码来源:processEventQueue.php

示例5: __construct

 /**
  * Constructor
  * 
  * Takes cache directory as param
  *
  * @param $cache_dir string
  */
 function __construct($site_id)
 {
     $this->site_id = $site_id;
     $this->numGoals = owa_coreAPI::getSetting('base', 'numGoals');
     $this->numGoalGroups = owa_coreAPI::getSetting('base', 'numGoalGroups');
     $this->loadGoals($site_id);
     $this->loadGoalGroupLabels($site_id);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:15,代码来源:goalManager.php

示例6: pre

 function pre()
 {
     if (owa_coreAPI::getSetting('base', 'install_complete')) {
         owa_coreAPI::debug('Install complete redirecting to base.installDetected');
         return $this->redirectBrowser('base.installDetected', false);
     }
     return;
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:8,代码来源:installController.php

示例7: __construct

 function __construct($map = array())
 {
     if (array_key_exists('endpoint', $map)) {
         $this->endpoint = $map['endpoint'];
     } else {
         $this->endpoint = owa_coreAPI::getSetting('base', 'remote_event_queue_endpoint');
     }
     return parent::__construct($map);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:9,代码来源:httpEventQueue.php

示例8: getCapabilities

 function getCapabilities($role)
 {
     $caps = owa_coreAPI::getSetting('base', 'capabilities');
     if (array_key_exists($role, $caps)) {
         return $caps[$role];
     } else {
         return array();
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:9,代码来源:serviceUser.php

示例9: __construct

 function __construct($options = '')
 {
     // set the endpoint. move this to constructor
     if (array_key_exists('endpoint', $options)) {
         $this->endpoint = $options['endpoint'];
     } else {
         $this->endpoint = owa_coreAPI::getSetting('base', 'remote_event_queue_endpoint');
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:9,代码来源:httpEventQueue.php

示例10: __construct

 /**
  * Constructor
  *
  * @param array $params
  * @return owa_controller
  */
 function __construct($params)
 {
     if (owa_coreAPI::getSetting('base', 'cli_mode')) {
         return parent::__construct($params);
     } else {
         owa_coreAPI::notice("Controller not called from CLI");
         exit;
     }
 }
开发者ID:thomasalrin,项目名称:a-php-Open-Web-Analytics,代码行数:15,代码来源:cliController.php

示例11: _getDatabaseConnection

 /**
  * Creates a database connection for retrieving the requested data.
  **/
 function _getDatabaseConnection()
 {
     $db_type = owa_coreAPI::getSetting('base', 'db_type');
     $ret = owa_coreAPI::setupStorageEngine($db_type);
     if ($this->connection == null) {
         $connection_class = 'owa_db_' . $db_type;
         $this->connection = new $connection_class($this->settings->getDatabaseHost(), $this->settings->getDatabaseName(), $this->settings->getDatabaseUser(), $this->settings->getDatabasePassword());
     }
     return $this->connection;
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:13,代码来源:adserver.php

示例12: action

 function action()
 {
     $event = $this->getParam('event');
     $site = $this->getParam('site');
     $this->set('site', $site->_getProperties());
     $this->set('email_address', owa_coreAPI::getSetting('base', 'notice_email'));
     $this->set('session', $event->getProperties());
     $this->set('subject', sprintf('OWA: New Visit to %s', $site->get('domain')));
     //$this->set( 'plainTextView', 'base.notifyNewSessionPlainText');
     $this->setView('base.notifyNewSession');
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:11,代码来源:notifyNewSession.php

示例13: post

 function post()
 {
     if (owa_coreAPI::getSetting('base', 'delay_first_hit')) {
         // If not, then make sure that there is an inbound visitor_id
         if (!$this->event->get('visitor_id')) {
             // Log request properties to a cookie for processing by a second request and return
             owa_coreAPI::debug('Logging this request to first hit cookie.');
             return $this->log_first_hit();
         }
     }
     owa_coreAPI::debug('Logging ' . $this->event->getEventType() . ' to event queue...');
     return $this->addToEventQueue();
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:13,代码来源:processRequest.php

示例14: validate

 function validate()
 {
     $error = $this->getErrorMsg();
     if (empty($error)) {
         $this->setErrorMessage('The user name contains illegal characters.');
     }
     $u = $this->getValues();
     $illegals = owa_coreAPI::getSetting('base', 'user_id_illegal_chars');
     foreach ($illegals as $k => $char) {
         if (strpos($u, $char)) {
             $this->hasError();
             break;
         }
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:15,代码来源:userName.php

示例15: getGeolocationFromIp

 function getGeolocationFromIp($ip_address, $refresh = false)
 {
     if (empty($this->properties) || $refresh === true) {
         $geo = array('ip_address' => $ip_address, 'city' => '', 'country' => '', 'state' => '', 'country_code' => '', 'latitude' => '', 'longitude' => '');
         if (owa_coreAPI::getSetting('base', 'geolocation_lookup')) {
             $eq = owa_coreAPI::getEventDispatch();
             $geo = $eq->filter('geolocation', $geo);
         }
         foreach ($geo as $k => $v) {
             if (!$v) {
                 $geo[$k] = '(not set)';
             }
         }
         $this->properties = $geo;
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:16,代码来源:geolocation.php


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