Session API Documentation
SoPHIE Session API Class
The Session API provides access to session defintion, state and attributes.
Init: $sessionApi = $api->get('sophie_session');
Method: $sessionApi->get(...)
Get the session details from the context
Returns array
Method: $sessionApi->getSessionAttributes(...)
Get session attributes used within the current context. The function returns an associative array of all values.
Returns Array
Method: $sessionApi->getSessionAttribute(...)
Get a session attribute used within the current context. The function returns the value of the attribute if set.
Parameters:
- $attributeName
Returns String|null
Method: $sessionApi->setSessionAttribute(...)
Sets a session attribute used within the current context.
Parameters:
- $attributeName
- $attributeValue
Returns String|null
Method: $sessionApi->getAdditionalCss(...)
Gets a session specific CSS.
Returns String|null
Method: $sessionApi->setAdditionalCss(...)
Sets a session specific CSS.
Parameters:
- $attributeValue
Returns String|null
Method: $sessionApi->getState(...)
Get the session state
Returns String
Method: $sessionApi->setState(...)
Set the session state
Parameters:
- $state String
Returns Boolean
Method: $sessionApi->delete(...)
Deletes the session
Returns Boolean
Method: $sessionApi->deactivateDebugConsole(...)
Deactivates the debug console
Returns Boolean
Method: $sessionApi->activateDebugConsole(...)
Activates the debug console
Returns Boolean
Method: $sessionApi->deactivateCacheTreatment(...)
Deactivates the cache treatment
Returns Boolean
Method: $sessionApi->activateCacheTreatment(...)
Activates the cache treatment
Returns Boolean
Method: $sessionApi->deactivateSimulationMode(...)
Deactivates the simulation mode
Returns Boolean
Method: $sessionApi->activateSimulationMode(...)
Activates the simulation mode
Returns Boolean
Method: $sessionApi->deactivateVariableLog(...)
Deactivates the variable log
Returns Boolean
Method: $sessionApi->activateVariableLog(...)
Activates the variable log
Returns Boolean
Method: $sessionApi->setLogLevel(...)
Set session log level
Returns Boolean