Class to implement the Line-item service. More...
Public Member Functions | |
__construct ($platform, $endpoint, $limit=null, $pagingMode=false) | |
Class constructor. | |
getAll ($ltiResourceLinkId=null, $resourceId=null, $tag=null, $limit=null) | |
Retrieve all line-items. | |
createLineItem ($lineItem) | |
Create a new line-item. | |
saveLineItem ($lineItem) | |
Save a line-item. | |
deleteLineItem ($lineItem) | |
Delete a line-item. | |
![]() | |
__construct ($platform, $endpoint, $path='') | |
Class constructor. | |
![]() | |
__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. | |
Static Public Member Functions | |
static | getLineItem ($platform, $endpoint) |
Retrieve a line item. | |
Data Fields | |
const | MEDIA_TYPE_LINE_ITEM = 'application/vnd.ims.lis.v2.lineitem+json' |
Line-item media type. | |
const | MEDIA_TYPE_LINE_ITEMS = 'application/vnd.ims.lis.v2.lineitemcontainer+json' |
Line-item container media type. | |
![]() | |
$unsigned = false | |
Whether service request should be sent unsigned. | |
Static Public Attributes | |
static | $SCOPE = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem' |
Access scope. | |
static | $SCOPE_READONLY = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly' |
Read-only access scope. | |
static | $defaultLimit = null |
Default limit on size of container to be returned from requests. | |
Additional Inherited Members | |
![]() | |
parseContextsInArray ($contexts, $arr) | |
Parse the JSON for context references. | |
![]() | |
$endpoint = null | |
Service endpoint. | |
$scope = null | |
Service access scope. | |
$mediaType = null | |
Media type of message body. | |
Class to implement the Line-item service.
Definition at line 15 of file Service/LineItem.php.
__construct | ( | $platform, | |
$endpoint, | |||
$limit = null , |
|||
$pagingMode = false |
|||
) |
Class constructor.
Platform | $platform | Platform object for this service request |
string | $endpoint | Service endpoint |
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 |
Definition at line 69 of file Service/LineItem.php.
References LineItem\$endpoint.
createLineItem | ( | $lineItem | ) |
Create a new line-item.
LTI\LineItem | $lineItem | Line-item object |
Definition at line 147 of file Service/LineItem.php.
References LineItem\getPlatform(), and Service\send().
deleteLineItem | ( | $lineItem | ) |
Delete a line-item.
LTI\LineItem | $lineItem | Line-item object |
Definition at line 192 of file Service/LineItem.php.
References Service\send().
getAll | ( | $ltiResourceLinkId = null , |
|
$resourceId = null , |
|||
$tag = null , |
|||
$limit = null |
|||
) |
Retrieve all line-items.
The returned items can be filtered by a resource link ID, a resource ID and/or a tag. Requests can also be limited to a number of items which may mean that multiple requests will be made to retrieve the full list.
string | null | $ltiResourceLinkId | LTI resource link ID (optional) |
string | null | $resourceId | Tool resource ID (optional) |
string | null | $tag | Tag (optional) |
int | null | $limit | Limit of line-items to be returned in each request, null for service default (optional) |
Definition at line 91 of file Service/LineItem.php.
References LineItem\$endpoint, LineItem\$ltiResourceLinkId, LineItem\$resourceId, LineItem\$tag, LineItem\getPlatform(), and Service\send().
|
static |
Retrieve a line item.
Platform | $platform | Platform object for this service request |
string | $endpoint | Line-item endpoint |
Definition at line 208 of file Service/LineItem.php.
References LineItem\$endpoint.
saveLineItem | ( | $lineItem | ) |
Save a line-item.
LTI\LineItem | $lineItem | Line-item object |
Definition at line 170 of file Service/LineItem.php.
References LineItem\getPlatform(), and Service\send().
|
static |
Default limit on size of container to be returned from requests.
Definition at line 41 of file Service/LineItem.php.
|
static |
Access scope.
Definition at line 31 of file Service/LineItem.php.
|
static |
Read-only access scope.
Definition at line 36 of file Service/LineItem.php.
const MEDIA_TYPE_LINE_ITEM = 'application/vnd.ims.lis.v2.lineitem+json' |
Line-item media type.
Definition at line 21 of file Service/LineItem.php.
const MEDIA_TYPE_LINE_ITEMS = 'application/vnd.ims.lis.v2.lineitemcontainer+json' |
Line-item container media type.
Definition at line 26 of file Service/LineItem.php.