Class to implement the Membership service.
More...
|
const | MEDIA_TYPE_MEMBERSHIPS_V1 = 'application/vnd.ims.lis.v2.membershipcontainer+json' |
| Media type for version 1 of Memberships service.
|
|
const | MEDIA_TYPE_MEMBERSHIPS_NRPS = 'application/vnd.ims.lti-nrps.v2.membershipcontainer+json' |
| Media type for Names and Role Provisioning service.
|
|
bool | $unsigned = false |
| Whether service request should be sent unsigned.
|
|
|
static string | $SCOPE = 'https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly' |
| Access scope.
|
|
static int | $defaultLimit = 100 |
| Default limit on size of container to be returned from requests.
|
|
|
array | parseContextsInArray (object|array $contexts, array $arr) |
| Parse the JSON for context references.
|
|
string | $endpoint = null |
| Service endpoint.
|
|
string | $scope = null |
| Service access scope.
|
|
string | $mediaType = null |
| Media type of message body.
|
|
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
- Copyright
- SPV Software Products
- Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3
◆ __construct()
__construct |
( |
ResourceLink|Context | $source, |
|
|
string | $endpoint, |
|
|
string | $format = self::MEDIA_TYPE_MEMBERSHIPS_V1, |
|
|
?int | $limit = null, |
|
|
bool | $pagingMode = false ) |
Class constructor.
- Parameters
-
object | $source | The object to which the memberships apply (ResourceLink or Context) |
string | $endpoint | Service endpoint |
string | $format | Format to request |
int | null | $limit | Limit of line-items to be returned in each request, null for all |
bool | $pagingMode | True if only a single page should be requested when a limit is set |
◆ get()
array bool get |
( |
?string | $role = null, |
|
|
?int | $limit = null ) |
Get the memberships.
- Parameters
-
string | null | $role | Role for which memberships are to be requested (optional, default is all roles) |
int | null | $limit | Limit on the number of memberships to be returned in each request, null for service default (optional) |
- Returns
- array|bool The array of UserResult objects if successful, otherwise false
◆ getWithGroups()
array bool getWithGroups |
( |
?string | $role = null, |
|
|
?int | $limit = null ) |
Get the memberships.
- Parameters
-
string | null | $role | Role for which memberships are to be requested (optional, default is all roles) |
int | null | $limit | Limit on the number of memberships to be returned in each request, null for service default (optional) |
- Returns
- array|bool The array of UserResult objects if successful, otherwise false