|
| __construct ($key=null, $dataConnector=null, $autoEnable=false) |
| Class constructor.
|
|
| delete () |
| Delete the tool consumer from the database.
|
|
| doServiceRequest ($service, $method, $format, $data) |
| Perform a service request.
|
|
| getDataConnector () |
| Get the data connector.
|
|
| getIsAvailable () |
| Is the consumer key available to accept launch requests?
|
|
| getKey () |
| Get the tool consumer key.
|
|
| getRecordId () |
| Get the tool consumer record ID.
|
|
| getSetting ($name, $default='') |
| Get a setting value.
|
|
| getSettings () |
| Get an array of all setting values.
|
|
| getToolSettings ($simple=true) |
| Get Tool Settings.
|
|
| hasToolSettingsService () |
| Check if the Tool Settings service is supported.
|
|
| initialise () |
| Initialise the tool consumer.
|
|
| initialize () |
| Initialise the tool consumer.
|
|
| save () |
| Save the tool consumer to the database.
|
|
| saveSettings () |
| Save setting values.
|
|
| setKey ($key) |
| Set the tool consumer key.
|
|
| setRecordId ($id) |
| Sets the tool consumer record ID.
|
|
| setSetting ($name, $value=null) |
| Set a setting value.
|
|
| setSettings ($settings) |
| Set an array of all setting values.
|
|
| setToolSettings ($settings=array()) |
| Perform a Tool Settings service request.
|
|
| signParameters ($url, $type, $version, $params) |
| Add the OAuth signature to an LTI message.
|
|
|
static | addSignature ($endpoint, $consumerKey, $consumerSecret, $data, $method='POST', $type=null) |
| Add the OAuth signature to an array of message parameters or to a header string.
|
|
static | fromRecordId ($id, $dataConnector) |
| Load the tool consumer from the database by its record ID.
|
|
|
string | $consumerGuid = null |
| Tool consumer GUID (as reported by first tool consumer connection).
|
|
string | $consumerName = null |
| Name of tool consumer (as reported by last tool consumer connection).
|
|
string | $consumerVersion = null |
| Tool consumer version (as reported by last tool consumer connection).
|
|
int | $created = null |
| Date/time when the object was created.
|
|
string | $cssPath = null |
| Optional CSS path (as reported by last tool consumer connection).
|
|
string | $defaultEmail = '' |
| Default email address (or email domain) to use when no email address is provided for a user.
|
|
boolean | $enabled = false |
| Whether the tool consumer instance is enabled to accept incoming connection requests.
|
|
int | $enableFrom = null |
| Date/time from which the the tool consumer instance is enabled to accept incoming connection requests.
|
|
int | $enableUntil = null |
| Date/time until which the tool consumer instance is enabled to accept incoming connection requests.
|
|
int | $idScope = ToolProvider::ID_SCOPE_ID_ONLY |
| Default scope to use when generating an Id value for a user.
|
|
int | $lastAccess = null |
| Date of last connection from this tool consumer.
|
|
string | $ltiVersion = null |
| LTI version (as reported by last tool consumer connection).
|
|
string | $name = null |
| Local name of tool consumer.
|
|
stdClass | $profile = null |
| The consumer profile data.
|
|
boolean | $protected = false |
| Whether the tool consumer instance is protected by matching the consumer_guid value in incoming requests.
|
|
string | $secret = null |
| Shared secret.
|
|
array | $settings = null |
| Setting values (LTI parameters, custom parameters and local parameters).
|
|
int | $updated = null |
| Date/time when the object was last updated.
|
|
◆ __construct()
IMSGlobal\LTI\ToolProvider\ToolConsumer::__construct |
( |
| $key = null, |
|
|
| $dataConnector = null, |
|
|
| $autoEnable = false ) |
Class constructor.
- Parameters
-
string | $key | Consumer key |
DataConnector | $dataConnector | A data connector object |
boolean | $autoEnable | true if the tool consumers is to be enabled automatically (optional, default is false) |
◆ addSignature()
static IMSGlobal\LTI\ToolProvider\ToolConsumer::addSignature |
( |
| $endpoint, |
|
|
| $consumerKey, |
|
|
| $consumerSecret, |
|
|
| $data, |
|
|
| $method = 'POST', |
|
|
| $type = null ) |
|
static |
Add the OAuth signature to an array of message parameters or to a header string.
- Return values
-
mixed | Array of signed message parameters or header string |
◆ delete()
IMSGlobal\LTI\ToolProvider\ToolConsumer::delete |
( |
| ) |
|
Delete the tool consumer from the database.
- Return values
-
boolean | True if the object was successfully deleted |
◆ doServiceRequest()
IMSGlobal\LTI\ToolProvider\ToolConsumer::doServiceRequest |
( |
| $service, |
|
|
| $method, |
|
|
| $format, |
|
|
| $data ) |
Perform a service request.
- Parameters
-
object | $service | Service object to be executed |
string | $method | HTTP action |
string | $format | Media type |
mixed | $data | Array of parameters or body string |
- Return values
-
HTTPMessage | HTTP object containing request and response details |
◆ fromRecordId()
static IMSGlobal\LTI\ToolProvider\ToolConsumer::fromRecordId |
( |
| $id, |
|
|
| $dataConnector ) |
|
static |
Load the tool consumer from the database by its record ID.
- Parameters
-
string | $id | The consumer key record ID |
DataConnector | $dataConnector | Database connection object |
- Return values
-
object | ToolConsumer The tool consumer object |
◆ getDataConnector()
IMSGlobal\LTI\ToolProvider\ToolConsumer::getDataConnector |
( |
| ) |
|
Get the data connector.
- Return values
-
mixed | Data connector object or string |
◆ getIsAvailable()
IMSGlobal\LTI\ToolProvider\ToolConsumer::getIsAvailable |
( |
| ) |
|
Is the consumer key available to accept launch requests?
- Return values
-
boolean | True if the consumer key is enabled and within any date constraints |
◆ getKey()
IMSGlobal\LTI\ToolProvider\ToolConsumer::getKey |
( |
| ) |
|
Get the tool consumer key.
- Return values
-
◆ getRecordId()
IMSGlobal\LTI\ToolProvider\ToolConsumer::getRecordId |
( |
| ) |
|
Get the tool consumer record ID.
- Return values
-
int | Consumer record ID value |
◆ getSetting()
IMSGlobal\LTI\ToolProvider\ToolConsumer::getSetting |
( |
| $name, |
|
|
| $default = '' ) |
Get a setting value.
- Parameters
-
string | $name | Name of setting |
string | $default | Value to return if the setting does not exist (optional, default is an empty string) |
- Return values
-
◆ getSettings()
IMSGlobal\LTI\ToolProvider\ToolConsumer::getSettings |
( |
| ) |
|
Get an array of all setting values.
- Return values
-
array | Associative array of setting values |
◆ getToolSettings()
IMSGlobal\LTI\ToolProvider\ToolConsumer::getToolSettings |
( |
| $simple = true | ) |
|
Get Tool Settings.
- Parameters
-
boolean | $simple | True if all the simple media type is to be used (optional, default is true) |
- Return values
-
mixed | The array of settings if successful, otherwise false |
◆ hasToolSettingsService()
IMSGlobal\LTI\ToolProvider\ToolConsumer::hasToolSettingsService |
( |
| ) |
|
Check if the Tool Settings service is supported.
- Return values
-
boolean | True if this tool consumer supports the Tool Settings service |
◆ initialise()
IMSGlobal\LTI\ToolProvider\ToolConsumer::initialise |
( |
| ) |
|
Initialise the tool consumer.
Pseudonym for initialize().
◆ save()
IMSGlobal\LTI\ToolProvider\ToolConsumer::save |
( |
| ) |
|
Save the tool consumer to the database.
- Return values
-
boolean | True if the object was successfully saved |
◆ saveSettings()
IMSGlobal\LTI\ToolProvider\ToolConsumer::saveSettings |
( |
| ) |
|
Save setting values.
- Return values
-
boolean | True if the settings were successfully saved |
◆ setKey()
IMSGlobal\LTI\ToolProvider\ToolConsumer::setKey |
( |
| $key | ) |
|
Set the tool consumer key.
- Parameters
-
string | $key | Consumer key value |
◆ setRecordId()
IMSGlobal\LTI\ToolProvider\ToolConsumer::setRecordId |
( |
| $id | ) |
|
Sets the tool consumer record ID.
- Parameters
-
int | $id | Consumer record ID value |
◆ setSetting()
IMSGlobal\LTI\ToolProvider\ToolConsumer::setSetting |
( |
| $name, |
|
|
| $value = null ) |
Set a setting value.
- Parameters
-
string | $name | Name of setting |
string | $value | Value to set, use an empty value to delete a setting (optional, default is null) |
◆ setSettings()
IMSGlobal\LTI\ToolProvider\ToolConsumer::setSettings |
( |
| $settings | ) |
|
Set an array of all setting values.
- Parameters
-
array | $settings | Associative array of setting values |
◆ setToolSettings()
IMSGlobal\LTI\ToolProvider\ToolConsumer::setToolSettings |
( |
| $settings = array() | ) |
|
Perform a Tool Settings service request.
- Parameters
-
array | $settings | An associative array of settings (optional, default is none) |
- Return values
-
boolean | True if action was successful, otherwise false |
◆ signParameters()
IMSGlobal\LTI\ToolProvider\ToolConsumer::signParameters |
( |
| $url, |
|
|
| $type, |
|
|
| $version, |
|
|
| $params ) |
Add the OAuth signature to an LTI message.
- Parameters
-
string | $url | URL for message request |
string | $type | LTI message type |
string | $version | LTI version |
array | $params | Message parameters |
- Return values
-
array | Array of signed message parameters |
◆ $consumerGuid
string IMSGlobal\LTI\ToolProvider\ToolConsumer::$consumerGuid = null |
Tool consumer GUID (as reported by first tool consumer connection).
$consumerGuid
◆ $consumerName
string IMSGlobal\LTI\ToolProvider\ToolConsumer::$consumerName = null |
Name of tool consumer (as reported by last tool consumer connection).
$consumerName
◆ $consumerVersion
string IMSGlobal\LTI\ToolProvider\ToolConsumer::$consumerVersion = null |
Tool consumer version (as reported by last tool consumer connection).
$consumerVersion
◆ $created
int IMSGlobal\LTI\ToolProvider\ToolConsumer::$created = null |
Date/time when the object was created.
$created
◆ $cssPath
string IMSGlobal\LTI\ToolProvider\ToolConsumer::$cssPath = null |
Optional CSS path (as reported by last tool consumer connection).
$cssPath
◆ $defaultEmail
string IMSGlobal\LTI\ToolProvider\ToolConsumer::$defaultEmail = '' |
Default email address (or email domain) to use when no email address is provided for a user.
$defaultEmail
◆ $enabled
boolean IMSGlobal\LTI\ToolProvider\ToolConsumer::$enabled = false |
Whether the tool consumer instance is enabled to accept incoming connection requests.
$enabled
◆ $enableFrom
int IMSGlobal\LTI\ToolProvider\ToolConsumer::$enableFrom = null |
Date/time from which the the tool consumer instance is enabled to accept incoming connection requests.
$enableFrom
◆ $enableUntil
int IMSGlobal\LTI\ToolProvider\ToolConsumer::$enableUntil = null |
Date/time until which the tool consumer instance is enabled to accept incoming connection requests.
$enableUntil
◆ $idScope
Default scope to use when generating an Id value for a user.
$idScope
◆ $lastAccess
int IMSGlobal\LTI\ToolProvider\ToolConsumer::$lastAccess = null |
Date of last connection from this tool consumer.
$lastAccess
◆ $ltiVersion
string IMSGlobal\LTI\ToolProvider\ToolConsumer::$ltiVersion = null |
LTI version (as reported by last tool consumer connection).
$ltiVersion
◆ $name
string IMSGlobal\LTI\ToolProvider\ToolConsumer::$name = null |
Local name of tool consumer.
$name
◆ $protected
boolean IMSGlobal\LTI\ToolProvider\ToolConsumer::$protected = false |
Whether the tool consumer instance is protected by matching the consumer_guid value in incoming requests.
$protected
◆ $secret
string IMSGlobal\LTI\ToolProvider\ToolConsumer::$secret = null |
◆ $settings
array IMSGlobal\LTI\ToolProvider\ToolConsumer::$settings = null |
Setting values (LTI parameters, custom parameters and local parameters).
$settings
◆ $updated
int IMSGlobal\LTI\ToolProvider\ToolConsumer::$updated = null |
Date/time when the object was last updated.
$updated
The documentation for this class was generated from the following file:
- lib/ltiprovider/src/ToolProvider/ToolConsumer.php