本文整理汇总了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'));
}