本文整理匯總了PHP中CakeSession::time方法的典型用法代碼示例。如果您正苦於以下問題:PHP CakeSession::time方法的具體用法?PHP CakeSession::time怎麽用?PHP CakeSession::time使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CakeSession
的用法示例。
在下文中一共展示了CakeSession::time方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
/**
* Pseudo constructor.
*
* @param string $base The base path for the Session
* @return void
*/
public static function init($base = null)
{
self::$time = time();
$checkAgent = Configure::read('Session.checkAgent');
if (($checkAgent === true || $checkAgent === null) && env('HTTP_USER_AGENT') != null) {
self::$_userAgent = md5(env('HTTP_USER_AGENT') . Configure::read('Security.salt'));
}
self::_setPath($base);
self::_setHost(env('HTTP_HOST'));
register_shutdown_function('session_write_close');
}
示例2: init
/**
* Pseudo constructor.
*
* @param string $base The base path for the Session
* @return void
*/
public static function init($base = null)
{
self::$time = time();
if (env('HTTP_USER_AGENT')) {
self::$_userAgent = md5(env('HTTP_USER_AGENT') . Configure::read('Security.salt'));
}
self::_setPath($base);
self::_setHost(env('HTTP_HOST'));
if (!self::$_initialized) {
register_shutdown_function('session_write_close');
}
self::$_initialized = true;
}
示例3: init
/**
* Constructor.
*
* @param string $base The base path for the Session
* @param boolean $start Should session be started right now
*/
public static function init($base = null, $start = true)
{
App::import('Core', 'Security');
self::$time = time();
$checkAgent = Configure::read('Session.checkAgent');
if (($checkAgent === true || $checkAgent === null) && env('HTTP_USER_AGENT') != null) {
self::$_userAgent = md5(env('HTTP_USER_AGENT') . Configure::read('Security.salt'));
}
self::_setPath($base);
self::_setHost(env('HTTP_HOST'));
}