本文整理汇总了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();
}
示例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
//.........这里部分代码省略.........