TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SessionUtility Class Reference
Inheritance diagram for SessionUtility:
SingletonInterface

Public Member Functions

 __construct ()
 
 initSession ($formPrefix= '')
 
 storeSession ()
 
 destroySession ()
 
 setSessionData ($key, $value)
 
 getSessionData ($key=null, $default=null)
 
 setFormPrefix ($formPrefix)
 

Protected Member Functions

 removeFiles ()
 

Protected Attributes

 $sessionData = array()
 
 $formPrefix = ''
 
 $frontendController
 

Detailed Description

A session utility

Definition at line 24 of file SessionUtility.php.

Constructor & Destructor Documentation

__construct ( )

Constructor

Definition at line 48 of file SessionUtility.php.

References $GLOBALS.

Member Function Documentation

destroySession ( )

Destroy the session data for the form

Returns
void

Definition at line 89 of file SessionUtility.php.

References SessionUtility\removeFiles().

getSessionData (   $key = null,
  $default = null 
)

Retrieve a member of the $sessionData variable

If no $key is passed, returns the entire $sessionData array

Parameters
string$keyParameter to search for
mixed$defaultDefault value to use if key not found
Returns
mixed Returns NULL if key does not exist

Definition at line 121 of file SessionUtility.php.

References SessionUtility\$sessionData.

Referenced by SessionUtility\removeFiles(), and SessionUtility\storeSession().

initSession (   $formPrefix = '')

Store the form input in a session

Parameters
string$formPrefix
Returns
void

Definition at line 59 of file SessionUtility.php.

References SessionUtility\$formPrefix, and SessionUtility\setFormPrefix().

removeFiles ( )
protected

Remove uploaded files from the typo3temp

Returns
void

Definition at line 145 of file SessionUtility.php.

References SessionUtility\$sessionData, SessionUtility\getSessionData(), and GeneralUtility\unlink_tempfile().

Referenced by SessionUtility\destroySession().

setFormPrefix (   $formPrefix)

Set the form prefix

Parameters
string$formPrefix
Returns
array

Definition at line 135 of file SessionUtility.php.

References SessionUtility\$formPrefix.

Referenced by SessionUtility\initSession().

setSessionData (   $key,
  $value 
)

Set the session Data by $key

Parameters
string$key
string$value
Returns
void

Definition at line 107 of file SessionUtility.php.

storeSession ( )

Store the form input in a session

Returns
void

Definition at line 74 of file SessionUtility.php.

References SessionUtility\getSessionData().

Member Data Documentation

$formPrefix = ''
protected

Definition at line 38 of file SessionUtility.php.

Referenced by SessionUtility\initSession(), and SessionUtility\setFormPrefix().

$frontendController
protected

Definition at line 43 of file SessionUtility.php.

$sessionData = array()
protected

Definition at line 31 of file SessionUtility.php.

Referenced by SessionUtility\getSessionData(), and SessionUtility\removeFiles().