Class OCSP_SESSION

Description

Session Class

  • author: Peter Krebs (pk)<pitlinz@users.sourceforge.net>
  • version: pk-08-03-14 singleton
  • version: $Id: OCSP_SESSION.phpclass,v 1.9 2008/11/19 07:40:07 pitlinz Exp $
  • project: Open CSP-Management
  • since: pk-07-07-31
  • license: GNU Public License

Located in /common/OCSP_SESSION.phpclass (line 84)


	
			
Variable Summary
 static mixed $instance
 static mixed $myName
 boolean $hasChanged
 boolean $isOpened
 boolean $isWritten
Method Summary
 static OCSP_SESSION getInstance ([boolean $open = false])
 static void get_rnd_iv ( $iv_len)
 static boolean hasInstance ()
 static boolean isSessionError ( &$aValue, mixed $aValue)
 OCSP_SESSION __construct ()
 void __destruct ()
 void clearUser ([boolean $debug = false])
 void closeSession ()
 string decrypt (string $enc_text, [string $password = ""], [int $iv_len = 16])
 string encrypt (string $plain_text, [string $password = ""], [int $iv_len = 16])
 string getId ()
 string getName ()
 OCSP_USER getUser ([boolean $reqDB = FALSE], [boolean $debug = FALSE])
 int getUserId ([boolean $debug = False])
 mixed getValue (string $aVarName, [boolean $debug = FALSE])
 string get_cryptPassword ()
 boolean hasChanged ()
 boolean; isOpened ()
 boolean openSession (string $aName, boolean $debug)
 void refreshUser ([boolean $withoutUsrDb = FALSE])
 boolean setDefaultValue (string $aVarName, string $aValue, [boolean $debug = False])
 mixed setValue (string $aVarName, mixed $aValue, [boolean $debug = False])
 void unsetValue (string $aVarName, [boolean $debug = False])
Variables
static mixed $instance = NULL (line 91)
static mixed $myName = "" (line 96)
  • staticvar: string $myName:
  • access: protected
boolean $hasChanged = false (line 133)
  • access: protected
boolean $isOpened = false (line 120)
  • access: protected
boolean $isWritten = false (line 126)
  • access: protected
array $mySessionVals = array() (line 114)
  • access: protected
Methods
static getInstance (line 195)

returns the session object

  • access: public
OCSP_SESSION getInstance ([boolean $open = false])
  • boolean $open: (open the session?)
static get_rnd_iv (line 485)
  • access: private
void get_rnd_iv ( $iv_len)
  • $iv_len
static hasInstance (line 219)

returns if we already have an instance

  • since: pk-08-03-14
  • access: public
boolean hasInstance ()
static isSessionError (line 150)
  • access: public
boolean isSessionError ( &$aValue, mixed $aValue)
  • mixed $aValue
  • &$aValue
Constructor __construct (line 162)

constructor

  • access: protected
OCSP_SESSION __construct ()
Destructor __destruct (line 177)

save session on descruct

void __destruct ()
clearUser (line 427)

clears all user data from the session

void clearUser ([boolean $debug = false])
  • boolean $debug
closeSession (line 253)

closes a session and writes the data

void closeSession ()
decrypt (line 563)

md5 decrypts a text

if $password is empty $_SESSION['MD5PWD'] is used

string decrypt (string $enc_text, [string $password = ""], [int $iv_len = 16])
  • string $enc_text
  • string $password
  • int $iv_len
encrypt (line 523)

md5 encrypts a text

if $password is empty $_SESSION['MD5PWD'] is used

string encrypt (string $plain_text, [string $password = ""], [int $iv_len = 16])
  • string $plain_text
  • string $password
  • int $iv_len
getId (line 292)
string getId ()
getName (line 284)
string getName ()
getUser (line 462)
  • requires: user/OCSP_USER.phpclass
OCSP_USER getUser ([boolean $reqDB = FALSE], [boolean $debug = FALSE])
  • boolean $reqDB: (establish a database connection)
  • boolean $debug
getUserId (line 442)

returns the stored userId

  • since: pk-08-07-02
  • access: public
int getUserId ([boolean $debug = False])
  • boolean $debug
getValue (line 307)
mixed getValue (string $aVarName, [boolean $debug = FALSE])
  • string $aVarName
  • boolean $debug
get_cryptPassword (line 497)

returns a default password for encrypt/decrypt

  • access: private
string get_cryptPassword ()
hasChanged (line 276)
boolean hasChanged ()
isOpened (line 268)
boolean; isOpened ()
openSession (line 240)

starts the session

boolean openSession (string $aName, boolean $debug)
  • string $aName
  • boolean $debug
refreshUser (line 475)

refreshes the user session

  • access: public
void refreshUser ([boolean $withoutUsrDb = FALSE])
  • boolean $withoutUsrDb
setDefaultValue (line 377)

sets a session value which is not set

if $aVarName is already set in the session nothing is done and False returned

  • return: if the value has changed
  • since: pk-08-06-11
  • access: public
boolean setDefaultValue (string $aVarName, string $aValue, [boolean $debug = False])
  • string $aVarName
  • string $aValue
  • boolean $debug
setValue (line 338)

sets a session var value

  • return: (TRUE in case of no error else an OCSP_SESSION_ERROR object)
mixed setValue (string $aVarName, mixed $aValue, [boolean $debug = False])
  • string $aVarName
  • mixed $aValue
  • boolean $debug
unsetValue (line 394)
void unsetValue (string $aVarName, [boolean $debug = False])
  • string $aVarName
  • boolean $debug

Documentation generated on Thu, 08 Jan 2009 17:47:08 +0100 by phpDocumentor 1.4.0a2