ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class to represent a tool consumer context. More...
Public Member Functions | |
__construct () | |
Class constructor. More... | |
initialize () | |
Initialise the context. More... | |
initialise () | |
Initialise the context. More... | |
save () | |
Save the context to the database. More... | |
delete () | |
Delete the context from the database. More... | |
getConsumer () | |
Get tool consumer. More... | |
setConsumerId ($consumerId) | |
Set tool consumer ID. More... | |
getKey () | |
Get tool consumer key. More... | |
getId () | |
Get context ID. More... | |
getRecordId () | |
Get the context record ID. More... | |
setRecordId ($id) | |
Sets the context record ID. More... | |
getDataConnector () | |
Get the data connector. More... | |
getSetting ($name, $default='') | |
Get a setting value. More... | |
setSetting ($name, $value=null) | |
Set a setting value. More... | |
getSettings () | |
Get an array of all setting values. More... | |
setSettings ($settings) | |
Set an array of all setting values. More... | |
saveSettings () | |
Save setting values. More... | |
hasToolSettingsService () | |
Check if the Tool Settings service is supported. More... | |
getToolSettings ($mode=Service\ToolSettings::MODE_CURRENT_LEVEL, $simple=true) | |
Get Tool Settings. More... | |
setToolSettings ($settings=array()) | |
Perform a Tool Settings service request. More... | |
hasMembershipService () | |
Check if the Membership service is supported. More... | |
getMembership () | |
Get Memberships. More... | |
Static Public Member Functions | |
static | fromRecordId ($id, $dataConnector) |
Load the context from the database. More... | |
static | fromConsumer ($consumer, $ltiContextId) |
Class constructor from consumer. More... | |
Data Fields | |
$ltiContextId = null | |
Context ID as supplied in the last connection request. More... | |
$title = null | |
Context title. More... | |
$settings = null | |
Setting values (LTI parameters, custom parameters and local parameters). More... | |
$created = null | |
Date/time when the object was created. More... | |
$updated = null | |
Date/time when the object was last updated. More... | |
Private Member Functions | |
load ($id=null) | |
Load the context from the database. More... | |
Private Attributes | |
$consumer = null | |
Tool Consumer for this context. More... | |
$consumerId = null | |
Tool Consumer ID for this context. More... | |
$id = null | |
ID for this context. More... | |
$settingsChanged = false | |
Whether the settings value have changed since last saved. More... | |
$dataConnector = null | |
Data connector object or string. More... | |
Class to represent a tool consumer context.
Definition at line 17 of file Context.php.
IMSGlobal\LTI\ToolProvider\Context::__construct | ( | ) |
Class constructor.
Definition at line 85 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\initialize().
IMSGlobal\LTI\ToolProvider\Context::delete | ( | ) |
Delete the context from the database.
Definition at line 139 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\getDataConnector().
|
static |
Class constructor from consumer.
ToolConsumer | $consumer | Consumer instance |
string | $ltiContextId | LTI Context ID value |
Definition at line 425 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$consumer, $context, and IMSGlobal\LTI\ToolProvider\Context\$ltiContextId.
Referenced by IMSGlobal\LTI\ToolProvider\ToolProvider\authenticate().
|
static |
Load the context from the database.
int | $id | Record ID of context |
DataConnector | $dataConnector | Database connection object |
Definition at line 407 of file Context.php.
References $context, IMSGlobal\LTI\ToolProvider\Context\$dataConnector, and IMSGlobal\LTI\ToolProvider\Context\$id.
Referenced by IMSGlobal\LTI\ToolProvider\ResourceLink\getContext().
IMSGlobal\LTI\ToolProvider\Context::getConsumer | ( | ) |
Get tool consumer.
Definition at line 151 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$consumer, IMSGlobal\LTI\ToolProvider\ToolConsumer\fromRecordId(), and IMSGlobal\LTI\ToolProvider\Context\getDataConnector().
Referenced by IMSGlobal\LTI\ToolProvider\Context\getKey().
IMSGlobal\LTI\ToolProvider\Context::getDataConnector | ( | ) |
Get the data connector.
Definition at line 227 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$dataConnector.
Referenced by IMSGlobal\LTI\ToolProvider\Context\delete(), IMSGlobal\LTI\ToolProvider\Context\getConsumer(), IMSGlobal\LTI\ToolProvider\Context\load(), and IMSGlobal\LTI\ToolProvider\Context\save().
IMSGlobal\LTI\ToolProvider\Context::getId | ( | ) |
Get context ID.
Definition at line 191 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$ltiContextId.
IMSGlobal\LTI\ToolProvider\Context::getKey | ( | ) |
Get tool consumer key.
Definition at line 179 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\getConsumer().
IMSGlobal\LTI\ToolProvider\Context::getMembership | ( | ) |
Get Memberships.
Definition at line 388 of file Context.php.
References $response, $url, and IMSGlobal\LTI\ToolProvider\Context\getSetting().
IMSGlobal\LTI\ToolProvider\Context::getRecordId | ( | ) |
Get the context record ID.
Definition at line 203 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$id.
IMSGlobal\LTI\ToolProvider\Context::getSetting | ( | $name, | |
$default = '' |
|||
) |
Get a setting value.
string | $name | Name of setting |
string | $default | Value to return if the setting does not exist (optional, default is an empty string) |
Definition at line 242 of file Context.php.
References $default, $name, and settings().
Referenced by IMSGlobal\LTI\ToolProvider\Context\getMembership(), IMSGlobal\LTI\ToolProvider\Context\getToolSettings(), IMSGlobal\LTI\ToolProvider\Context\hasMembershipService(), IMSGlobal\LTI\ToolProvider\Context\hasToolSettingsService(), IMSGlobal\LTI\ToolProvider\Context\setSetting(), and IMSGlobal\LTI\ToolProvider\Context\setToolSettings().
IMSGlobal\LTI\ToolProvider\Context::getSettings | ( | ) |
Get an array of all setting values.
Definition at line 281 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$settings.
IMSGlobal\LTI\ToolProvider\Context::getToolSettings | ( | $mode = Service\ToolSettings::MODE_CURRENT_LEVEL , |
|
$simple = true |
|||
) |
Get Tool Settings.
int | $mode | Mode for request (optional, default is current level only) |
boolean | $simple | True if all the simple media type is to be used (optional, default is true) |
Definition at line 340 of file Context.php.
References $response, $url, and IMSGlobal\LTI\ToolProvider\Context\getSetting().
IMSGlobal\LTI\ToolProvider\Context::hasMembershipService | ( | ) |
Check if the Membership service is supported.
Definition at line 374 of file Context.php.
References $url, and IMSGlobal\LTI\ToolProvider\Context\getSetting().
IMSGlobal\LTI\ToolProvider\Context::hasToolSettingsService | ( | ) |
Check if the Tool Settings service is supported.
Definition at line 323 of file Context.php.
References $url, and IMSGlobal\LTI\ToolProvider\Context\getSetting().
IMSGlobal\LTI\ToolProvider\Context::initialise | ( | ) |
Initialise the context.
Pseudonym for initialize().
Definition at line 110 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\initialize().
IMSGlobal\LTI\ToolProvider\Context::initialize | ( | ) |
Initialise the context.
Definition at line 95 of file Context.php.
References settings().
Referenced by IMSGlobal\LTI\ToolProvider\Context\__construct(), IMSGlobal\LTI\ToolProvider\Context\initialise(), and IMSGlobal\LTI\ToolProvider\Context\load().
|
private |
Load the context from the database.
int | $id | Record ID of context (optional, default is null) |
Definition at line 451 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$id, IMSGlobal\LTI\ToolProvider\Context\getDataConnector(), and IMSGlobal\LTI\ToolProvider\Context\initialize().
IMSGlobal\LTI\ToolProvider\Context::save | ( | ) |
Save the context to the database.
Definition at line 122 of file Context.php.
References $ok, and IMSGlobal\LTI\ToolProvider\Context\getDataConnector().
Referenced by IMSGlobal\LTI\ToolProvider\Context\saveSettings().
IMSGlobal\LTI\ToolProvider\Context::saveSettings | ( | ) |
Save setting values.
Definition at line 305 of file Context.php.
References $ok, and IMSGlobal\LTI\ToolProvider\Context\save().
IMSGlobal\LTI\ToolProvider\Context::setConsumerId | ( | $consumerId | ) |
Set tool consumer ID.
int | $consumerId | Tool Consumer ID for this resource link. |
Definition at line 166 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$consumerId.
IMSGlobal\LTI\ToolProvider\Context::setRecordId | ( | $id | ) |
Sets the context record ID.
Definition at line 215 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$id.
IMSGlobal\LTI\ToolProvider\Context::setSetting | ( | $name, | |
$value = null |
|||
) |
Set a setting value.
string | $name | Name of setting |
string | $value | Value to set, use an empty value to delete a setting (optional, default is null) |
Definition at line 261 of file Context.php.
References $name, IMSGlobal\LTI\ToolProvider\Context\getSetting(), and settings().
IMSGlobal\LTI\ToolProvider\Context::setSettings | ( | $settings | ) |
Set an array of all setting values.
array | $settings | Associative array of setting values |
Definition at line 293 of file Context.php.
References IMSGlobal\LTI\ToolProvider\Context\$settings, and settings().
IMSGlobal\LTI\ToolProvider\Context::setToolSettings | ( | $settings = array() | ) |
Perform a Tool Settings service request.
array | $settings | An associative array of settings (optional, default is none) |
Definition at line 358 of file Context.php.
References $response, IMSGlobal\LTI\ToolProvider\Context\$settings, $url, and IMSGlobal\LTI\ToolProvider\Context\getSetting().
|
private |
Tool Consumer for this context.
Definition at line 56 of file Context.php.
Referenced by IMSGlobal\LTI\ToolProvider\Context\fromConsumer(), and IMSGlobal\LTI\ToolProvider\Context\getConsumer().
|
private |
Tool Consumer ID for this context.
Definition at line 62 of file Context.php.
Referenced by IMSGlobal\LTI\ToolProvider\Context\setConsumerId().
int IMSGlobal\LTI\ToolProvider\Context::$created = null |
Date/time when the object was created.
Definition at line 43 of file Context.php.
|
private |
Data connector object or string.
Definition at line 80 of file Context.php.
Referenced by IMSGlobal\LTI\ToolProvider\Context\fromRecordId(), and IMSGlobal\LTI\ToolProvider\Context\getDataConnector().
|
private |
ID for this context.
Definition at line 68 of file Context.php.
Referenced by IMSGlobal\LTI\ToolProvider\Context\fromRecordId(), IMSGlobal\LTI\ToolProvider\Context\getRecordId(), IMSGlobal\LTI\ToolProvider\Context\load(), and IMSGlobal\LTI\ToolProvider\Context\setRecordId().
string IMSGlobal\LTI\ToolProvider\Context::$ltiContextId = null |
Context ID as supplied in the last connection request.
Definition at line 25 of file Context.php.
Referenced by IMSGlobal\LTI\ToolProvider\Context\fromConsumer(), and IMSGlobal\LTI\ToolProvider\Context\getId().
array IMSGlobal\LTI\ToolProvider\Context::$settings = null |
Setting values (LTI parameters, custom parameters and local parameters).
Definition at line 37 of file Context.php.
Referenced by IMSGlobal\LTI\ToolProvider\Context\getSettings(), IMSGlobal\LTI\ToolProvider\Context\setSettings(), and IMSGlobal\LTI\ToolProvider\Context\setToolSettings().
|
private |
Whether the settings value have changed since last saved.
Definition at line 74 of file Context.php.
string IMSGlobal\LTI\ToolProvider\Context::$title = null |
Context title.
Definition at line 31 of file Context.php.
int IMSGlobal\LTI\ToolProvider\Context::$updated = null |
Date/time when the object was last updated.
Definition at line 49 of file Context.php.