Hoa central
Public Member Functions | Public Attributes | List of all members
Hoa\Session\Flash Class Reference
Inheritance diagram for Hoa\Session\Flash:

Public Member Functions

 __construct ($namespace= '_defaultFlash')
 
 offsetGet ($offset)
 
 offsetUnset ($offset)
 
 getIterator ()
 
- Public Member Functions inherited from Hoa\Session\Session
 __construct ($namespace= '_default', $cache=null, $cacheExpire=null)
 
 getNamespace ()
 
 isEmpty ()
 
 isExpired ()
 
 hasExpired ($exception=true)
 
 isLocked ()
 
 getProfile ()
 
 rememberMe ($modify)
 
 forgetMe ()
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 count ()
 
 getIterator ()
 
 writeAndClose ()
 
 clean ()
 
 delete ()
 

Public Attributes

const EVENT_CHANNEL = 'hoa://Event/Session/Flash/'
 
const TOP_NAMESPACE = '__Hoa_Flash__'
 
- Public Attributes inherited from Hoa\Session\Session
const EVENT_CHANNEL = 'hoa://Event/Session/'
 
const TOP_NAMESPACE = '__Hoa__'
 
const PROFILE = 0
 
const BUCKET = 1
 
const NO_CACHE = 'nocache'
 
const CACHE_PUBLIC = 'public'
 
const CACHE_PRIVATE = 'private'
 
const CACHE_PRIVATE_NO_EXPIRE = 'private_no_expire'
 

Additional Inherited Members

- Static Public Member Functions inherited from Hoa\Session\Session
static start ($cache=null, $cacheExpire=null)
 
static isStarted ()
 
static destroy ()
 
static getId ()
 
static newId ($deleteOldSession=false)
 
- Protected Member Functions inherited from Hoa\Session\Session
 initialize ($reset=false)
 
- Protected Attributes inherited from Hoa\Session\Session
 $_namespace = null
 
 $_profile = null
 
 $_bucket = null
 
- Static Protected Attributes inherited from Hoa\Session\Session
static $_started = false
 
static $_lock = []
 

Detailed Description

Class .

Flash is a special top-namespace that contains namespaces which are destructed when empty. Each data is destructed after a read.

Definition at line 48 of file Flash.php.

Constructor & Destructor Documentation

Hoa\Session\Flash::__construct (   $namespace = '_defaultFlash')

Manipulate a namespace. If session has not been previously started, it will be done automatically.

Parameters
string$namespaceNamespace.
Returns
void

Definition at line 74 of file Flash.php.

75  {
76  parent::__construct($namespace, parent::NO_CACHE);
77 
78  return;
79  }

Member Function Documentation

Hoa\Session\Flash::getIterator ( )

Iterate over data in the namespace.

Returns

Definition at line 117 of file Flash.php.

118  {
119  $out = parent::getIterator();
120  $this->delete();
121 
122  return $out;
123  }
Hoa\Session\Flash::offsetGet (   $offset)

Get a data.

Parameters
mixed$offsetData name.
Returns
mixed

Definition at line 87 of file Flash.php.

88  {
89  $out = parent::offsetGet($offset);
90  $this->offsetUnset($offset);
91 
92  return $out;
93  }
offsetUnset($offset)
Definition: Flash.php:101

Here is the call graph for this function:

Hoa\Session\Flash::offsetUnset (   $offset)

Unset a data.

Parameters
mixed$offsetData name.
Returns
void

Definition at line 101 of file Flash.php.

102  {
103  parent::offsetUnset($offset);
104 
105  if (true === $this->isEmpty()) {
106  $this->delete();
107  }
108 
109  return;
110  }

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

const Hoa\Session\Flash::EVENT_CHANNEL = 'hoa://Event/Session/Flash/'

Event channel.

string

Definition at line 55 of file Flash.php.

const Hoa\Session\Flash::TOP_NAMESPACE = '__Hoa_Flash__'

Top-namespace. See parent::TOP_NAMESPACE for more informations.

string

Definition at line 62 of file Flash.php.


The documentation for this class was generated from the following file: