Public Member Functions
Flash Class Reference

Maintains a users state while they browse the application. More...

Public Member Functions

 Flash ()
 
 set ($key, $value, $life=1)
 
 get ($key)
 
 extendLife ($key, $life=1)
 
 lifeFor ($key)
 
 remove ($key)
 

Detailed Description

Maintains a users state while they browse the application.

Version
1.2
Author
DinuSV

Stores session information for each user as serialized data. Sessions will likely run globally with each page load, so the session class mut either be initialized in each controller, or it can be auto-loaded by the application.

Member Function Documentation

Flash ( )

Constructor

set (   $key,
  $value,
  $life = 1 
)

Set flash data

Parameters
string$key: the key to set it at
mixed$value: value to set
integer$life: number of pages to last
get (   $key)

Get flash data from a specified key

Parameters
string$key
Returns
mixed : null, if not found
extendLife (   $key,
  $life = 1 
)

Extend life for a key

Parameters
string$key
integer$life
lifeFor (   $key)

Get life for key

Parameters
string$key
Returns
integer
remove (   $key)

Remove flash data at a specified key

Parameters
string$key