|
@@ -41,8 +41,6 @@ class Payload {
|
|
|
/**
|
|
|
* Get an item from the session.
|
|
|
*
|
|
|
- * A default value may also be specified, and will be returned in the item doesn't exist.
|
|
|
- *
|
|
|
* <code>
|
|
|
* // Get an item from the session
|
|
|
* $name = Session::get('name');
|
|
@@ -90,8 +88,9 @@ class Payload {
|
|
|
/**
|
|
|
* Write an item to the session flash data.
|
|
|
*
|
|
|
- * Flash data only exists for the next request. After that, it will be removed from
|
|
|
- * the session. Flash data is useful for temporary status or welcome messages.
|
|
|
+ * Flash data only exists for the next request. After that, it will
|
|
|
+ * be removed from the session. Flash data is useful for temporary
|
|
|
+ * status or welcome messages.
|
|
|
*
|
|
|
* <code>
|
|
|
* // Flash an item to the session
|
|
@@ -122,8 +121,9 @@ class Payload {
|
|
|
/**
|
|
|
* Keep a session flash item from expiring at the end of the request.
|
|
|
*
|
|
|
- * If a string is passed to the method, only that item will be kept. An array may also
|
|
|
- * be passed to the method, in which case all items in the array will be kept.
|
|
|
+ * If a string is passed to the method, only that item will be kept.
|
|
|
+ * An array may also be passed to the method, in which case all
|
|
|
+ * items in the array will be kept.
|
|
|
*
|
|
|
* <code>
|
|
|
* // Keep a session flash item from expiring
|
|
@@ -178,8 +178,8 @@ class Payload {
|
|
|
/**
|
|
|
* Age the session payload, preparing it for storage after a request.
|
|
|
*
|
|
|
- * The session flash data will be aged and the last activity timestamp will be updated.
|
|
|
- * The aged session array will be returned by the method.
|
|
|
+ * The session flash data will be aged and the last activity timestamp will
|
|
|
+ * be updated. The aged session array will be returned by the method.
|
|
|
*
|
|
|
* @return array
|
|
|
*/
|
|
@@ -187,8 +187,9 @@ class Payload {
|
|
|
{
|
|
|
$this->session['last_activity'] = time();
|
|
|
|
|
|
- // To age the data, we will forget all of the old keys and then rewrite the newly
|
|
|
- // flashed items to have old keys, which will be available for the next request.
|
|
|
+ // To age the data, we will forget all of the old keys and then
|
|
|
+ // rewrite the newly flashed items to have old keys, which will
|
|
|
+ // be available for the next request.
|
|
|
foreach ($this->session['data'] as $key => $value)
|
|
|
{
|
|
|
if (strpos($key, ':old:') === 0) $this->forget($key);
|