Session Interface Reference

Detailed Description

Session is the interface for session implementations and defines access to session variables.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 19 of file Session.php.

+ Inheritance diagram for Session:

Public Member Functions

 getID ()
 
 get ($key, $default=null)
 
 set ($key, $value)
 
 remove ($key)
 
 exist ($key)
 
 clear ()
 
 destroy ()
 
 setAuthUser ($login)
 
 getAuthUser ()
 

Member Function Documentation

getID ( )

Get the id of the session.

Returns
The id of the current session.

Implemented in DefaultSession, and ClientSideSession.

get (   $key,
  $default = null 
)

Returns the value of a session variable.

Parameters
$keyThe key (name) of the session vaiable.
$defaultThe default value if the key is not defined (optional, default: null)
Returns
The session var or null if it doesn't exist.

Implemented in DefaultSession, and ClientSideSession.

set (   $key,
  $value 
)

Sets the value of a session variable.

Parameters
$keyThe key (name) of the session vaiable.
$valueThe value of the session variable.

Implemented in DefaultSession, and ClientSideSession.

remove (   $key)

Remove a session variable.

Parameters
$keyThe key (name) of the session variable.

Implemented in DefaultSession, and ClientSideSession.

exist (   $key)

Tests, if a certain session variable is defined.

Parameters
$keyThe key (name) of the session variable.
Returns
Boolean whether the session variable is set or not.

Implemented in DefaultSession, and ClientSideSession.

clear ( )

Clear the session data.

Implemented in DefaultSession, and ClientSideSession.

destroy ( )

Destroy the session.

Implemented in DefaultSession, and ClientSideSession.

setAuthUser (   $login)

Set the login of authenticated user.

Parameters
$loginLogin name of the user

Implemented in DefaultSession, ClientSideSession, and AuthTokenSession.

getAuthUser ( )

Get the login of the authenticated user.

Returns
String

Implemented in DefaultSession, ClientSideSession, and AuthTokenSession.