本文整理匯總了PHP中owa_coreAPI::setState方法的典型用法代碼示例。如果您正苦於以下問題:PHP owa_coreAPI::setState方法的具體用法?PHP owa_coreAPI::setState怎麽用?PHP owa_coreAPI::setState使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類owa_coreAPI
的用法示例。
在下文中一共展示了owa_coreAPI::setState方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: resetSessionState
private function resetSessionState()
{
$last_req = owa_coreAPI::getState('s', 'last_req');
owa_coreAPI::clearState('s');
owa_coreAPI::setState('s', 'last_req', $last_req);
}
示例2: log_first_hit
/**
* Log request properties of the first hit from a new visitor to a special cookie.
*
* This is used to determine if the request is made by an actual browser instead
* of a robot with spoofed or unknown user agent.
*
* @access public
*/
function log_first_hit()
{
$state_name = owa_coreAPI::getSetting('base', 'first_hit_param');
$this->event->set('event_type', 'base.first_page_request');
return owa_coreAPI::setState($state_name, '', $this->event->getProperties(), 'cookie', true);
}
示例3: setSiteSessionState
function setSiteSessionState($site_id, $name, $value, $store_type = 'cookie')
{
$store_name = owa_coreAPI::getSetting('base', 'site_session_param') . '_' . $site_id;
return owa_coreAPI::setState($store_name, $name, $value, $store_type, true);
}