LTI Integration Library  3.1.0
PHP class library for building LTI integrations
Membership Class Reference

Class to implement the Membership service. More...

Inheritance diagram for Membership:
Service

Public Member Functions

 __construct ($source, $endpoint)
 Class constructor. More...
 
 get ($role=null, $limit=0)
 Get the memberships. More...
 
- Public Member Functions inherited from Service
 __construct ($consumer, $endpoint, $mediaType)
 Class constructor. More...
 
 send ($method, $parameters=array(), $body=null)
 Send a service request. More...
 
 getHTTPMessage ()
 Get HTTPMessage object for last request. More...
 

Additional Inherited Members

- Data Fields inherited from Service
 $unsigned = false
 Whether service request should be sent unsigned. More...
 
- Protected Attributes inherited from Service
 $endpoint
 Service endpoint. More...
 

Detailed Description

Class to implement the Membership service.

Author
Stephen P Vickers steph.nosp@m.en@s.nosp@m.pvsof.nosp@m.twar.nosp@m.eprod.nosp@m.ucts.nosp@m..com
Version
3.1.0
Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3

Definition at line 17 of file Membership.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $source,
  $endpoint 
)

Class constructor.

Parameters
object$sourceThe object to which the memberships apply (ResourceLink or Context)
string$endpointService endpoint

Definition at line 33 of file Membership.php.

References Service\$endpoint.

Member Function Documentation

◆ get()

get (   $role = null,
  $limit = 0 
)

Get the memberships.

Parameters
string$roleRole for which memberships are to be requested (optional, default is all roles)
int$limitLimit on the number of memberships to be returned (optional, default is all)
Returns
mixed The array of UserResult objects if successful, otherwise false

Delete any old users which were not in the latest list from the tool consumer

Definition at line 48 of file Membership.php.

References UserResult\fromResourceLink(), ToolProvider\ID_SCOPE_RESOURCE, ToolProvider\parseRoles(), and Service\send().


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