當前位置: 首頁>>代碼示例>>PHP>>正文


PHP owa_coreAPI::getRequestTimestamp方法代碼示例

本文整理匯總了PHP中owa_coreAPI::getRequestTimestamp方法的典型用法代碼示例。如果您正苦於以下問題:PHP owa_coreAPI::getRequestTimestamp方法的具體用法?PHP owa_coreAPI::getRequestTimestamp怎麽用?PHP owa_coreAPI::getRequestTimestamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在owa_coreAPI的用法示例。


在下文中一共展示了owa_coreAPI::getRequestTimestamp方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: timestampDefault

 static function timestampDefault()
 {
     return owa_coreAPI::getRequestTimestamp();
 }
開發者ID:arineng,項目名稱:Open-Web-Analytics,代碼行數:4,代碼來源:trackingEventHelpers.php

示例2: pre

 /**
  * Must be called before all other event property setting functions
  */
 function pre()
 {
     // ENVIRONMENTAL PARAMS
     // check for no value
     // clean
     // apply default if necessary
     // filter
     // these should really be pulled from the service layer
     $this->event->set('timestamp', owa_coreAPI::getRequestTimestamp());
     $this->event->set('microtime', microtime());
     //set user agent
     if (!$this->event->get('HTTP_USER_AGENT')) {
         $this->event->set('HTTP_USER_AGENT', owa_coreAPI::getServerParam('HTTP_USER_AGENT'));
     }
     // filter user agent
     $this->event->set('HTTP_USER_AGENT', $this->eq->filter('user_agent', $this->event->get('HTTP_USER_AGENT')));
     // set http_host
     if (!$this->event->get('HTTP_HOST')) {
         $this->event->set('HTTP_HOST', owa_coreAPI::getServerParam('HTTP_HOST'));
     }
     //filter http_host
     $this->event->set('HTTP_HOST', $this->eq->filter('HTTP_HOST', $this->event->get('HTTP_HOST')));
     // set language
     if (!$this->event->get('language')) {
         $this->event->set('language', substr(owa_coreAPI::getServerParam('HTTP_ACCEPT_LANGUAGE'), 0, 5));
     }
     // filter language
     $this->event->set('language', $this->eq->filter('language', $this->event->get('language')));
     // Set Ip Address
     if (!$this->event->get('ip_address')) {
         $this->event->set('ip_address', owa_coreAPI::getServerParam('REMOTE_ADDR'));
     }
     $this->event->set('ip_address', $this->eq->filter('ip_address', $this->event->get('ip_address')));
     // Set host related properties
     if (!$this->event->get('REMOTE_HOST')) {
         $this->event->set('REMOTE_HOST', owa_coreAPI::getServerParam('REMOTE_HOST'));
     }
     //$teh = owa_trackingEventHelpers::getInstance();
     //$teh->setEnvironmentals( $this->event );
     /// REQUIRED PARAMS
     // check for value
     // clean based on type
     // filter
     // apply default value if necessary
     // set page type
     // moved
     if (!$this->event->get('page_type')) {
         $this->event->set('page_type', '(not set)');
     }
     //filter page type
     //moved
     $this->event->set('page_type', $this->eq->filter('page_type', $this->event->get('page_type')));
     // filter page_url
     //moved
     $this->event->set('page_url', $this->eq->filter('page_url', $this->event->get('page_url'), $this->event->get('site_id')));
     // Page title
     // moved
     if ($this->event->get('page_title')) {
         $page_title = owa_lib::utf8Encode(trim($this->event->get('page_title')));
     } else {
         $page_title = '(not set)';
     }
     $this->event->set('page_title', $this->eq->filter('page_title', $page_title));
     // needs key translation
     // translated,
     $this->event->set('days_since_first_session', $this->event->get('dsfs'));
     $this->event->set('days_since_prior_session', $this->event->get('dsps'));
     $this->event->set('num_prior_sessions', $this->event->get('nps'));
     // OPTIONAL PARAMS
     // filter http referer
     /* moved */
     if ($this->event->get('HTTP_REFERER')) {
         $this->event->set('HTTP_REFERER', $this->eq->filter('HTTP_REFERER', $this->event->get('HTTP_REFERER')));
     }
     // Filter the target url of clicks
     /* moved */
     if ($this->event->get('target_url')) {
         $this->event->set('target_url', $this->eq->filter('target_url', $this->event->get('target_url'), $this->event->get('site_id')));
     }
     /* moved */
     if ($this->event->get('source')) {
         $this->event->set('source', $this->eq->filter('source', trim(strtolower($this->event->get('source')))));
     }
     /* moved */
     if ($this->event->get('medium')) {
         $this->event->set('medium', $this->eq->filter('medium', trim(strtolower($this->event->get('medium')))));
     }
     // set session referer (the site that originally referer the visit)
     /* moved */
     if ($this->event->get('session_referer')) {
         $this->event->set('session_referer', $this->eq->filter('session_referer', $this->event->get('session_referer')));
     }
     $this->setCustomVariables();
     // DEPENDANT SETS
     // evaluate
     // produce value
     // filter
//.........這裏部分代碼省略.........
開發者ID:rgaviras,項目名稱:Open-Web-Analytics,代碼行數:101,代碼來源:processEvent.php


注:本文中的owa_coreAPI::getRequestTimestamp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。