spunQ_DummySession Class Reference

A blank session that throws away everything at the end of the PHP life-cycle. More...

Inheritance diagram for spunQ_DummySession:

spunQ_ArraySession spunQ_ISession

List of all members.

Public Member Functions

 __construct ()
 Constructor.
 getStartDateTime ()
 The DateTime this session has started.
 getEndDateTime ()
 The DateTime this session has ended.
 getUser ()
 Provides the acting user within this session.
 changeUser (spunQ_User $user)
 Changes the acting user within this session.
 setData ($name, $value)
 Adds arbitrary data to this session as a key/value pair.
 getData ($name=NULL)
 Retrieves previously stored data.
 userChanged ()
 Whether the user has changed while processing the current request.

Public Attributes

const KEY_USER_ID = '_userId'
 Array key to use for storing the id of the current user.
const KEY_SESSION_START = '_startDateTime'
 Array key to use for storing the start DateTime of the session.
const KEY_SESSION_END = '_endDateTime'
 Array key to use for storing the end DateTime of the session.

Protected Attributes

 $initialUserId = NULL
 The user id at the start of the request.
 $session
 The array to write session data into.
 $user
 Cache for getUser().


Detailed Description

A blank session that throws away everything at the end of the PHP life-cycle.

Definition at line 6 of file DummySession.class.php.


Member Function Documentation

spunQ_ArraySession::changeUser ( spunQ_User user  )  [inherited]

Changes the acting user within this session.

Parameters:
$user The new user owning this session.
Returns:
spunQ_ISession $this

Implements spunQ_ISession.

Definition at line 100 of file ArraySession.class.php.

spunQ_ArraySession::getData ( name = NULL  )  [inherited]

Retrieves previously stored data.

Parameters:
$name Name of the data to store. Will return all data as an associative array if this parameter is omitted.
Returns:
any Guaranteed to be an associative array if the argument is omitted.

Implements spunQ_ISession.

Definition at line 121 of file ArraySession.class.php.

spunQ_ArraySession::getEndDateTime (  )  [inherited]

The DateTime this session has ended.

Returns:
datetime? NULL if this is an ongoing session (one that is still accepting requests).

Implements spunQ_ISession.

Definition at line 69 of file ArraySession.class.php.

spunQ_ArraySession::getStartDateTime (  )  [inherited]

The DateTime this session has started.

The DateTime of the first request within this session.

Returns:
datetime

Implements spunQ_ISession.

Definition at line 62 of file ArraySession.class.php.

spunQ_ArraySession::getUser (  )  [inherited]

Provides the acting user within this session.

Returns:
spunQ_User

Implements spunQ_ISession.

Definition at line 79 of file ArraySession.class.php.

spunQ_ArraySession::setData ( name,
value 
) [inherited]

Adds arbitrary data to this session as a key/value pair.

Parameters:
$name Name of the data to store.
$value The actual data to store.
Returns:
spunQ_ISession $this

Implements spunQ_ISession.

Definition at line 113 of file ArraySession.class.php.

spunQ_ArraySession::userChanged (  )  [inherited]

Whether the user has changed while processing the current request.

Returns:
boolean

Implements spunQ_ISession.

Definition at line 134 of file ArraySession.class.php.


Member Data Documentation

spunQ_ArraySession::$initialUserId = NULL [protected, inherited]

The user id at the start of the request.

Type:
integer? NULL if this is the first request within the session.

Definition at line 31 of file ArraySession.class.php.

spunQ_ArraySession::$session [protected, inherited]

The array to write session data into.

Type:
array

Definition at line 37 of file ArraySession.class.php.

spunQ_ArraySession::$user [protected, inherited]

Cache for getUser().

Type:
spunQ_User? NULL until initialized in getUser().

Definition at line 43 of file ArraySession.class.php.

const spunQ_ArraySession::KEY_SESSION_END = '_endDateTime' [inherited]

Array key to use for storing the end DateTime of the session.

This value is not set in active sessions.

Definition at line 25 of file ArraySession.class.php.

const spunQ_ArraySession::KEY_SESSION_START = '_startDateTime' [inherited]

Array key to use for storing the start DateTime of the session.

Will be added to the session array if not already present (using the DateTime of the current request).

Definition at line 19 of file ArraySession.class.php.

const spunQ_ArraySession::KEY_USER_ID = '_userId' [inherited]

Array key to use for storing the id of the current user.

Will only be addded to the array if it is not the guest user!

Definition at line 12 of file ArraySession.class.php.


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

Generated on Fri Jul 1 11:12:39 2011 for spunQ3 by  doxygen 1.5.9