trait SessionTrait

This is a trait convienence methods to access the session from the launch object

Methods

session_get($key, $default = null)

Get a key from the session

session_put($key, $value)

Set a key in the session

session_forget($key)

Forget a key in the session

session_flush()

Flush the session

ltiRawPostArray()

Return the original $_POST array

ltiParameter($varname, $default = false)

Pull a keyed variable from the original LTI post data in the current session with default

ltiParameterUpdate($varname, $value)

Update a keyed variable from the original LTI post data in the current session with default

ltiRawParameter($varname, $default = false)

Pull a keyed variable from the original LTI post data in the current session with default

ltiCustomGet($varname, $default = false)

Pull out a custom variable from the LTIX session. Do not include the "custom_" prefix - this is automatic.

Details

at line 17
session_get($key, $default = null)

Get a key from the session

Parameters

$key
$default

at line 24
session_put($key, $value)

Set a key in the session

Parameters

$key
$value

at line 31
session_forget($key)

Forget a key in the session

Parameters

$key

at line 38
session_flush()

Flush the session

at line 45
ltiRawPostArray()

Return the original $_POST array

at line 53
ltiParameter($varname, $default = false)

Pull a keyed variable from the original LTI post data in the current session with default

Parameters

$varname
$default

at line 60
ltiParameterUpdate($varname, $value)

Update a keyed variable from the original LTI post data in the current session with default

Parameters

$varname
$value

at line 68
ltiRawParameter($varname, $default = false)

Pull a keyed variable from the original LTI post data in the current session with default

Parameters

$varname
$default

at line 76
ltiCustomGet($varname, $default = false)

Pull out a custom variable from the LTIX session. Do not include the "custom_" prefix - this is automatic.

Parameters

$varname
$default