Fix keep method and added started method.
This commit is contained in:
parent
498a83abe9
commit
a11c456f42
|
@ -71,6 +71,16 @@ protected static function invalid()
|
||||||
return is_null(static::$session) or ($idle > ($lifetime * 60));
|
return is_null(static::$session) or ($idle > ($lifetime * 60));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if session handling has been started for the request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function started()
|
||||||
|
{
|
||||||
|
return is_array(static::$session);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the session or flash data contains an item.
|
* Determine if the session or flash data contains an item.
|
||||||
*
|
*
|
||||||
|
@ -156,7 +166,12 @@ public static function reflash()
|
||||||
*/
|
*/
|
||||||
public static function keep($keys)
|
public static function keep($keys)
|
||||||
{
|
{
|
||||||
foreach ((array) $keys as $key) static::flash($key, static::get($key));
|
foreach ((array) $keys as $key)
|
||||||
|
{
|
||||||
|
$key = str_replace(array(':old:', ':new:'), '', $key);
|
||||||
|
|
||||||
|
static::flash($key, static::get($key));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue