Moodle PHP Documentation 4.1
Moodle 4.1.11 (Build: 20240610) (c8c84b4af18)
IMSGlobal\LTI\ToolProvider\Service\ToolSettings Class Reference
Inheritance diagram for IMSGlobal\LTI\ToolProvider\Service\ToolSettings:
IMSGlobal\LTI\ToolProvider\Service\Service

Public Member Functions

 __construct ($source, $endpoint, $simple=true)
 Class constructor.
 
 get ($mode=self::MODE_CURRENT_LEVEL)
 Get the tool settings.
 
 send ($method, $parameters=array(), $body=null)
 Send a service request.
 
 set ($settings)
 Set the tool settings.
 

Public Attributes

boolean $unsigned = false
 Whether service request should be sent unsigned.
 
const MODE_ALL_LEVELS = 2
 Settings at all levels mode.
 
const MODE_CURRENT_LEVEL = 1
 Settings at current level mode.
 
const MODE_DISTINCT_NAMES = 3
 Settings with distinct names at all levels mode.
 

Protected Attributes

string $endpoint
 Service endpoint.
 

Constructor & Destructor Documentation

◆ __construct()

IMSGlobal\LTI\ToolProvider\Service\ToolSettings::__construct ( $source,
$endpoint,
$simple = true )

Class constructor.

Parameters
object$sourceThe object to which the settings apply (ResourceLink, Context or ToolConsumer)
string$endpointService endpoint
boolean$simpleTrue if the simple media type is to be used (optional, default is true)

Reimplemented from IMSGlobal\LTI\ToolProvider\Service\Service.

Member Function Documentation

◆ get()

IMSGlobal\LTI\ToolProvider\Service\ToolSettings::get ( $mode = self::MODE_CURRENT_LEVEL)

Get the tool settings.

Parameters
int$modeMode for request (optional, default is current level only)
Return values
mixedThe array of settings if successful, otherwise false

◆ send()

IMSGlobal\LTI\ToolProvider\Service\Service::send ( $method,
$parameters = array(),
$body = null )
inherited

Send a service request.

Parameters
string$methodThe action type constant (optional, default is GET)
array$parametersQuery parameters to add to endpoint (optional, default is none)
string$bodyBody of request (optional, default is null)
Return values
HTTPMessageHTTP object containing request and response details

◆ set()

IMSGlobal\LTI\ToolProvider\Service\ToolSettings::set ( $settings)

Set the tool settings.

Parameters
array$settingsAn associative array of settings (optional, default is null)
Return values
HTTPMessageHTTP object containing request and response details

Member Data Documentation

◆ $endpoint

string IMSGlobal\LTI\ToolProvider\Service\Service::$endpoint
protectedinherited

Service endpoint.

$endpoint

◆ $unsigned

boolean IMSGlobal\LTI\ToolProvider\Service\Service::$unsigned = false
inherited

Whether service request should be sent unsigned.

$unsigned


The documentation for this class was generated from the following file: