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 21 of file Session.php.

+ Inheritance diagram for Session:

Public Member Functions

 getID ()
 
 get ($key)
 
 set ($key, $value)
 
 remove ($key)
 
 exist ($key)
 
 clear ()
 
 destroy ()
 
 setAuthUser (User $authUser)
 
 getAuthUser ()
 
 addError ($key, $error)
 
 getError ($key)
 
 getErrors ()
 
 clearErrors ()
 

Member Function Documentation

getID ( )

Get the id of the session.

Returns
The id of the current session.

Implemented in DefaultSession.

get (   $key)

Returns the value of an session variable.

Parameters
$keyThe key (name) of the session vaiable.
Returns
The session var or null if it doesn't exist.

Implemented in DefaultSession.

set (   $key,
  $value 
)

Sets the value of an session variable.

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

Implemented in DefaultSession.

remove (   $key)

Remove a session variable.

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

Implemented in DefaultSession.

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.

clear ( )

Clear the session data.

Implemented in DefaultSession.

destroy ( )

Destroy the session.

Implemented in DefaultSession.

setAuthUser ( User  $authUser)

Set the authenticated user.

Parameters
$authUserUser instance.

Implemented in DefaultSession.

getAuthUser ( )

Get the authenticated user.

Returns
User instance.

Implemented in DefaultSession.

addError (   $key,
  $error 
)

Add an error to the session data.

Parameters
$keyThe identifier of the error
$errorThe error message

Implemented in DefaultSession.

getError (   $key)

Get an error stored in the session data.

Parameters
$keyThe identifier of the error
Returns
The error message

Implemented in DefaultSession.

getErrors ( )

Get all errors stored in the session data.

Returns
The error message

Implemented in DefaultSession.

clearErrors ( )

Clear the session error data.

Implemented in DefaultSession.