Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ltiservice_memberships\local\resources\contextmemberships Class Reference

A resource implementing Context Memberships. More...

Inheritance diagram for ltiservice_memberships\local\resources\contextmemberships:
mod_lti\local\ltiservice\resource_base

Public Member Functions

 __construct ($service)
 Class constructor. More...
 
 check_tool ($typeid, $body=null, $scopes=null)
 Check to make sure the request is valid. More...
 
 check_tool_proxy ($toolproxyguid, $body=null)
 Check to make sure the request is valid. More...
 
 check_type ($typeid, $contextid, $permissionrequested, $body=null)
 Check to make sure the request is valid. More...
 
 execute ($response)
 Execute the request for this resource. More...
 
 get_endpoint ()
 Get the resource fully qualified endpoint. More...
 
 get_formats ()
 Get the resource media types. More...
 
 get_id ()
 Get the resource ID. More...
 
 get_methods ()
 Get the resource methods. More...
 
 get_path ()
 Get the resource path. More...
 
 get_permissions ($ltitype)
 get permissions from the config of the tool for that resource More...
 
 get_service ()
 Get the resource's service. More...
 
 get_template ()
 Get the resource template. More...
 
 get_type ()
 Get the resource type. More...
 
 get_variables ()
 Get the resource template variables. More...
 
 parse_value ($value)
 Parse a value for custom parameter substitution variables. More...
 

Public Attributes

const HTTP_DELETE = 'DELETE'
 HTTP Delete method.
 
const HTTP_GET = 'GET'
 HTTP Get method.
 
const HTTP_POST = 'POST'
 HTTP Post method.
 
const HTTP_PUT = 'PUT'
 HTTP Put method.
 

Protected Member Functions

 parse_template ()
 Parse the template for variables. More...
 

Protected Attributes

array $formats
 Media types supported by this resource.
 
string $id
 ID for this resource.
 
array $methods
 HTTP actions supported by this resource.
 
array $params
 Template variables parsed from the resource template.
 
string $template
 Template for this resource.
 
string $type
 Type for this resource.
 
array $variables
 Custom parameter substitution variables associated with this resource.
 

Detailed Description

A resource implementing Context Memberships.

Since
Moodle 3.0
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

ltiservice_memberships\local\resources\contextmemberships::__construct (   $service)

Class constructor.

Parameters
ltiservice_memberships::local::service::memberships$serviceService instance

Reimplemented from mod_lti\local\ltiservice\resource_base.

Member Function Documentation

◆ check_tool()

mod_lti\local\ltiservice\resource_base::check_tool (   $typeid,
  $body = null,
  $scopes = null 
)
inherited

Check to make sure the request is valid.

Parameters
int$typeidThe typeid we want to use
string$bodyBody of HTTP request message
string[]$scopesArray of scope(s) required for incoming request
Return values
boolean

◆ check_tool_proxy()

mod_lti\local\ltiservice\resource_base::check_tool_proxy (   $toolproxyguid,
  $body = null 
)
inherited

Check to make sure the request is valid.

Parameters
string$toolproxyguidConsumer key
string$bodyBody of HTTP request message
Return values
boolean
Deprecated:
since Moodle 3.7 MDL-62599 - please do not use this function any more.
See also
resource_base::check_tool()

◆ check_type()

mod_lti\local\ltiservice\resource_base::check_type (   $typeid,
  $contextid,
  $permissionrequested,
  $body = null 
)
inherited

Check to make sure the request is valid.

Parameters
int$typeidThe typeid we want to use
int$contextidThe course we are at
string$permissionrequestedThe permission to be checked
string$bodyBody of HTTP request message
Return values
boolean
Deprecated:
since Moodle 3.7 MDL-62599 - please do not use this function any more.
See also
resource_base::check_tool()

◆ execute()

ltiservice_memberships\local\resources\contextmemberships::execute (   $response)

Execute the request for this resource.

Parameters
mod_lti::local::ltiservice::response$responseResponse object for this request.

Reimplemented from mod_lti\local\ltiservice\resource_base.

◆ get_endpoint()

mod_lti\local\ltiservice\resource_base::get_endpoint ( )
inherited

Get the resource fully qualified endpoint.

Return values
string

Reimplemented in ltiservice_basicoutcomes\local\resources\basicoutcomes.

◆ get_formats()

mod_lti\local\ltiservice\resource_base::get_formats ( )
inherited

Get the resource media types.

Return values
array

◆ get_id()

mod_lti\local\ltiservice\resource_base::get_id ( )
inherited

Get the resource ID.

Return values
string

◆ get_methods()

mod_lti\local\ltiservice\resource_base::get_methods ( )
inherited

Get the resource methods.

Return values
array

◆ get_path()

mod_lti\local\ltiservice\resource_base::get_path ( )
inherited

Get the resource path.

Return values
string

◆ get_permissions()

mod_lti\local\ltiservice\resource_base::get_permissions (   $ltitype)
inherited

get permissions from the config of the tool for that resource

Parameters
int$ltitypeType of LTI
Return values
arraywith the permissions related to this resource by the $ltitype or empty if none.
Deprecated:
since Moodle 3.7 MDL-62599 - please do not use this function any more.
See also
resource_base::check_tool()

Reimplemented in ltiservice_memberships\local\resources\linkmemberships.

◆ get_service()

mod_lti\local\ltiservice\resource_base::get_service ( )
inherited

Get the resource's service.

Return values
mixed

◆ get_template()

mod_lti\local\ltiservice\resource_base::get_template ( )
inherited

Get the resource template.

Return values
string

◆ get_type()

mod_lti\local\ltiservice\resource_base::get_type ( )
inherited

Get the resource type.

Return values
string

◆ get_variables()

mod_lti\local\ltiservice\resource_base::get_variables ( )
inherited

Get the resource template variables.

Return values
array

◆ parse_template()

mod_lti\local\ltiservice\resource_base::parse_template ( )
protectedinherited

Parse the template for variables.

Return values
array

◆ parse_value()

ltiservice_memberships\local\resources\contextmemberships::parse_value (   $value)

Parse a value for custom parameter substitution variables.

Parameters
string$valueString to be parsed
Return values
string

Reimplemented from mod_lti\local\ltiservice\resource_base.


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