Class Session

Description

Represents a BIGACE Session.

A Session is initialized with a User ID and holds the most important runtime values for Script lifetime.

  • version: $Id: Session.php,v 1.5 2006/11/26 22:04:33 kpapst Exp $
  • copyright: Copyright (C) 2002-2006 Kevin Papst
  • author: Kevin Papst
  • license: GNU Public License


			
Method Summary
Session Session ( $id)
void destroy ()
void finalize ()
String getLanguageID ()
String getSessionID ()
mixed getSessionValue (String $key)
int getUserID ()
boolean isAnonymous ()
boolean isValueSet (String $key)
void setLanguage (Language $lang)
void setSessionValue (String $key, mixed $value)
void setUserByID (int $uid)
Methods
Constructor Session (line 67)
Session Session ( $id)
  • $id
destroy (line 223)

This destorys the Session, including the delete from Database.

void destroy ()
finalize (line 232)

Writes the Session Data into the Database for persistence issues.

void finalize ()
getConsumer (line 112)

Fetch the Consumer this Session belongs to.

  • return: the Consumer for this Session
Consumer getConsumer ()
getLanguageID (line 184)

Returns the Session Language ID.

This can be different from the System Default language and also different from the Users Language!

  • return: the Language ID, here the Locale
String getLanguageID ()
getSessionID (line 216)

Returns the Session ID.

  • return: the Session ID
String getSessionID ()
getSessionValue (line 154)

Returns the Session Value with the given Key.

If none could be found, it returns null.

  • return: the Value or null
mixed getSessionValue (String $key)
  • String $key: the Key of the searched Value
getUser (line 200)

Returns the actual User.

  • return: the Principal using this Session
Principal getUser ()
getUserID (line 192)

Returns the ID of the User.

  • return: the User ID
int getUserID ()
isAnonymous (line 208)

Returns if the current Session is a anonymous Session.

  • return: whether we use an anonymous session or not
boolean isAnonymous ()
isValueSet (line 133)

Checks if the a Value with the given key is set within this Session.

  • return: whether the Key is set or not
boolean isValueSet (String $key)
  • String $key: the Key foe the searched Value
setLanguage (line 168)

Sets the Language (Locale) of this Session.

The Parameter may not be a Language class, but the Locale String (Language->getLocale()).

void setLanguage (Language $lang)
  • Language $lang: the Language Locale to be set
setSessionValue (line 144)

Sets the given Key-Value Combination for this Session.

The Value must be serializable using the PHP method

!

void setSessionValue (String $key, mixed $value)
  • String $key: the Key for this Session value
  • mixed $value: the Value to set
setUserByID (line 120)

Sets the User by its ID.

void setUserByID (int $uid)
  • int $uid: the User ID

Documentation generated by phpDocumentor 1.3.1