Class to implement the Tool Settings service. More...
Public Member Functions | |
| __construct ($source, $endpoint, $simple=true) | |
| Class constructor. | |
| get ($mode=self::MODE_CURRENT_LEVEL) | |
| Get the tool settings. | |
| set ($settings) | |
| Set the tool settings. | |
Public Member Functions inherited from Service | |
| __construct ($platform, $endpoint) | |
| Class constructor. | |
| getConsumer () | |
| Get tool consumer. | |
| getPlatform () | |
| Get platform. | |
| getScope () | |
| Get access scope. | |
| send ($method, $parameters=array(), $body=null) | |
| Send a service request. | |
| getHttpMessage () | |
| Get HttpMessage object for last request. | |
Data Fields | |
| const | MODE_CURRENT_LEVEL = 1 |
| Settings at current level mode. | |
| const | MODE_ALL_LEVELS = 2 |
| Settings at all levels mode. | |
| const | MODE_DISTINCT_NAMES = 3 |
| Settings with distinct names at all levels mode. | |
Data Fields inherited from Service | |
| $unsigned = false | |
| Whether service request should be sent unsigned. | |
Static Public Attributes | |
| static | $SCOPE = 'https://purl.imsglobal.org/spec/lti-ts/scope/toolsetting' |
| Access scope. | |
Additional Inherited Members | |
Protected Member Functions inherited from Service | |
| parseContextsInArray ($contexts, $arr) | |
| Parse the JSON for context references. | |
Protected Attributes inherited from Service | |
| $endpoint = null | |
| Service endpoint. | |
| $scope = null | |
| Service access scope. | |
| $mediaType = null | |
| Media type of message body. | |
Class to implement the Tool Settings service.
Definition at line 17 of file ToolSettings.php.
| __construct | ( | $source, | |
| $endpoint, | |||
$simple = true |
|||
| ) |
Class constructor.
| Platform | Context | ResourceLink | $source | The object to which the settings apply (ResourceLink, Context or Platform) |
| string | $endpoint | Service endpoint |
| bool | $simple | True if the simple media type is to be used (optional, default is true) |
Definition at line 70 of file ToolSettings.php.
References Service\$endpoint, and ToolSettings\$SCOPE.
| get | ( | $mode = self::MODE_CURRENT_LEVEL | ) |
Get the tool settings.
| int | $mode | Mode for request (optional, default is current level only) |
Definition at line 95 of file ToolSettings.php.
References Util\jsonDecode(), and Service\send().
| set | ( | $settings | ) |
Set the tool settings.
| array | $settings | An associative array of settings (optional, default is null) |
Definition at line 127 of file ToolSettings.php.
|
static |
Access scope.
Definition at line 38 of file ToolSettings.php.
Referenced by ToolSettings\__construct().
| const MODE_ALL_LEVELS = 2 |
Settings at all levels mode.
Definition at line 28 of file ToolSettings.php.
| const MODE_CURRENT_LEVEL = 1 |
Settings at current level mode.
Definition at line 23 of file ToolSettings.php.
| const MODE_DISTINCT_NAMES = 3 |
Settings with distinct names at all levels mode.
Definition at line 33 of file ToolSettings.php.