wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
SessionData Class Reference

Public Member Functions

 getClassDefinitionFile ()
 
 init ($sessionID)
 
getInstance ()
 
 getID ()
 
get ($key)
 
 set ($key, &$val, $classFiles=null)
 
 addClassDefinitions ($classFiles)
 
 remove ($key)
 
 exist ($key)
 
 clear ()
 
 addError ($key, $error)
 
 getError ($key)
 
 getErrors ()
 
 clearErrors ()
 
 destroy ()
 

Public Attributes

 $ERROR_VARNAME = 'SessionData.errors'
 
 $_id = null
 

Detailed Description

This class provides a unified access to session data.

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

Definition at line 38 of file class.SessionData.php.

Member Function Documentation

SessionData::getClassDefinitionFile ( )

Get the file where the class definitions are stored.

Returns
filename

Definition at line 47 of file class.SessionData.php.

References Application\getId().

Referenced by addClassDefinitions(), destroy(), and init().

+ Here is the call graph for this function:

SessionData::init (   $sessionID)

Created a SessionData instance with given session id.

Parameters
sessionIDThe session id to use (maybe null).
Note
If session id is null an automatically generated session id will be used.

Definition at line 58 of file class.SessionData.php.

References $gSessionData, and getClassDefinitionFile().

Referenced by getInstance(), and Application\initialize().

+ Here is the call graph for this function:

& SessionData::getInstance ( )

Returns an instance of the class.

Note
If called before init an automatically generated session id will be used.
Returns
A reference to the only instance of the Singleton object

Definition at line 94 of file class.SessionData.php.

References $gSessionData, and init().

Referenced by RPCClient\__construct(), BatchController\addWorkPackage(), LockManager\aquireLock(), BackupController\backupFiles(), CopyController\copyNodes(), BatchDisplayController\endProcess(), CopyController\endProcess(), Obfuscator\ensureStorage(), Controller\execute(), ConcurrencyController\executeKernel(), SaveController\executeKernel(), LoginController\executeKernel(), MultipleActionController\executeKernel(), LongTaskController\executeKernel(), XMLExportController\exportNodes(), XMLExportController\finishExport(), RightsManager\getAuthUser(), BackupController\getBackupDir(), MySQLBackupController\getConnectionParameters(), CopyController\getCopyOID(), FormUtil\getInputControl(), NodeListController\getLength(), BatchController\getNumberOfSteps(), SearchController\getObjects(), RemoteCapablePersistenceFacadeImpl\getRegisteredObject(), RPCClient\getSessionId(), CopyController\getTargetMapper(), XMLExportController\initExport(), NodeListController\initialize(), BatchController\initialize(), SearchController\initialize(), BatchDisplayController\initialize(), ResourceListController\initialize(), MySQLBackupController\initialize(), CopyController\initialize(), XMLExportController\initialize(), BackupController\initialize(), LongTaskController\initialize(), PagingController\initialize(), Application\initialize(), BatchDisplayController\isRegistered(), PersistentIterator\load(), BatchDisplayController\loadNode(), BatchDisplayController\loadNodes(), SearchController\modifyModel(), Obfuscator\obfuscate(), BatchDisplayController\register(), CopyController\registerCopy(), RemoteCapablePersistenceFacadeImpl\registerObject(), LockManager\releaseAllLocks(), LockManager\releaseLock(), RemoteCapablePersistenceFacadeImpl\RemoteCapablePersistenceFacadeImpl(), PagingController\reset(), BackupController\restoreFiles(), PersistentIterator\save(), RPCClient\setSessionId(), smarty_function_sessionid(), smarty_function_sessionvalue(), BatchDisplayController\startProcess(), CopyController\startProcess(), Obfuscator\unveil(), MySQLBackupController\validate(), and BackupController\validate().

+ Here is the call graph for this function:

SessionData::getID ( )

Get the id of the session.

Returns
The id of the current session.

Definition at line 107 of file class.SessionData.php.

References $_id.

& SessionData::get (   $key)

Returns the value of an session variable

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

Definition at line 116 of file class.SessionData.php.

SessionData::set (   $key,
$val,
  $classFiles = null 
)

Sets the value of an session variable. If the value is an object it must eiter implement the Storable interface or the classFiles parameter must not be null.

Parameters
keyThe key (name) of the session vaiable.
valThe value of the session variable.
classFilesAn array of definition files needed to be included for rebuilding val from the session [default: null].
Returns
A reference to the session var

Definition at line 141 of file class.SessionData.php.

References addClassDefinitions(), and WCMFException\throwEx().

+ Here is the call graph for this function:

SessionData::addClassDefinitions (   $classFiles)

Add an array of class definitions to the session's class definitions list.

Parameters
classFilesAn array of class definition files.

Definition at line 175 of file class.SessionData.php.

References getClassDefinitionFile().

Referenced by set().

+ Here is the call graph for this function:

SessionData::remove (   $key)

Remove a session variable.

Parameters
keyThe key (name) of the session variable.

Definition at line 196 of file class.SessionData.php.

SessionData::exist (   $key)

Tests, if a certain session variable is defined.

Parameters
keyThe key (name) of the session variable.
Returns
A boolean flag. true if the session variable is set, false if not.

Definition at line 207 of file class.SessionData.php.

SessionData::clear ( )

Clear the session data.

Definition at line 216 of file class.SessionData.php.

SessionData::addError (   $key,
  $error 
)

Add an error to the session data.

Parameters
keyThe identifier of the error
errorThe error message

Definition at line 227 of file class.SessionData.php.

References $ERROR_VARNAME.

SessionData::getError (   $key)

Get an error stored in the session data.

Parameters
keyThe identifier of the error
Returns
The error message

Definition at line 240 of file class.SessionData.php.

References $ERROR_VARNAME.

SessionData::getErrors ( )

Get all errors stored in the session data.

Returns
The error message

Definition at line 250 of file class.SessionData.php.

References $ERROR_VARNAME.

SessionData::clearErrors ( )

Clear the session error data.

Definition at line 259 of file class.SessionData.php.

SessionData::destroy ( )

Destroy the session.

Definition at line 268 of file class.SessionData.php.

References getClassDefinitionFile().

+ Here is the call graph for this function:

Member Data Documentation

SessionData::$ERROR_VARNAME = 'SessionData.errors'

Definition at line 40 of file class.SessionData.php.

Referenced by addError(), getError(), and getErrors().

SessionData::$_id = null

Definition at line 41 of file class.SessionData.php.

Referenced by getID().


The documentation for this class was generated from the following file: