Class xTSessionScope

Description

Manage a session scope with PHP session and database for security

  • author: SimpliciWeb
  • version: $Id: xt_sessionscope.class.php 602 2007-07-18 16:18:38Z stephanet $

Located in /core/internal_components/common/scope/xt_sessionscope.class.php (line 56)


	
			
Direct descendents
Class Description
 class TSessionScope This class provide session management for PLICI.
 class TSessionScopeFo This class provide session management for PLICI on FrontOffice only.
Variable Summary
Method Summary
 xTSessionScope xTSessionScope (string $p_session_name)
 void destroyIfNeeded ()
 void forceCleanning ()
 void forceDestroy ()
 unknown forceToLoad ()
 string generateUniqueId ()
 string getDatabaseId ([string $p_id = ""])
 bool isNotValidId (string $p_value)
 bool xClean ()
 bool xExist (string $p_id,  &$r_bool_is_existing, bool $r_bool_is_existing)
 void xForceToLoad ()
 bool xInsert (string $p_id)
 void xLoadSession ([bool $p_force_to_load = false])
 void xUnset (string $p_name)
 bool xUpdate (string $p_id)
Variables
bool $m_is_existing_session = null (line 63)

IS existin session

bool $m_must_be_destroyed (line 130)

Must be destroyed

DbConnexion $m_object_dbconnexion = null (line 76)

Database Connexion object

Format $m_object_format = null (line 82)

Format Object

string $m_session_id = NULL (line 69)

Session id

integer $m_session_life_time_min = 30 (line 123)

Session life time

string $m_session_name (line 136)

Session name

integer $m_time_cookie_life = 0 (line 117)

Time cookie life

string $req_delete = "delete from t_session
where DATE_ADD(ses_modified, INTERVAL %d MINUTE) < NOW();"
(line 110)

SQL Request : Delete

string $req_exist = "select ses_id from t_session
where ses_id = '%s';"
(line 103)

SQL Request : exist

string $req_insert = "insert into t_session(ses_id,ses_created,ses_modified)
values('%s',now(), now());"
(line 96)

SQL Request : Insert

string $req_update = "update t_session set ses_modified=now()
where ses_id = '%s';"
(line 89)

SQL Request : Update

string $test (line 142)
Methods
Constructor xTSessionScope (line 151)

Constructor, init the requests and objects. And attempt to load a session

xTSessionScope xTSessionScope (string $p_session_name)
  • string $p_session_name
destroyIfNeeded (line 200)

Destroy if needed (if exist)

void destroyIfNeeded ()
forceCleanning (line 346)

Force to clean in database

void forceCleanning ()
forceDestroy (line 178)

Force destroy

void forceDestroy ()
forceToLoad (line 327)

Force to load a session

unknown forceToLoad ()
generateUniqueId (line 357)

Generate unique id : max of 35 charater generated

string generateUniqueId ()
getDatabaseId (line 189)

Get database id for the session id

string getDatabaseId ([string $p_id = ""])
  • string $p_id
isNotValidId (line 368)

Is not valid id

  • return: TRUE on error
bool isNotValidId (string $p_value)
  • string $p_value
xClean (line 406)

Clean the session

  • return: TRUE on error
  • access: private
bool xClean ()
xExist (line 451)

Test if exist session

  • return: TRUE on error
  • access: private
bool xExist (string $p_id,  &$r_bool_is_existing, bool $r_bool_is_existing)
  • string $p_id
  • bool $r_bool_is_existing
  • &$r_bool_is_existing
xForceToLoad (line 335)

Force to load

  • access: private
void xForceToLoad ()
xInsert (line 379)

Insert

  • return: TRUE on error
  • access: private
bool xInsert (string $p_id)
  • string $p_id
xLoadSession (line 257)

load session

  • access: private
void xLoadSession ([bool $p_force_to_load = false])
  • bool $p_force_to_load
xUnset (line 240)

unset

  • access: private
void xUnset (string $p_name)
  • string $p_name
xUpdate (line 426)

update

  • return: TRUE on error
bool xUpdate (string $p_id)
  • string $p_id

Documentation generated on Tue, 25 Mar 2008 15:37:38 +0100 by phpDocumentor 1.3.2