Class to implement the Line-item service.  
 More...
 | 
|   | __construct (Platform $platform, string $endpoint, ?int $limit=null, bool $pagingMode=false) | 
|   | Class constructor.  
  | 
|   | 
| LTI LineItem[] bool  | getAll (?string $ltiResourceLinkId=null, ?string $resourceId=null, ?string $tag=null, ?int $limit=null) | 
|   | Retrieve all line-items.  
  | 
|   | 
| bool  | createLineItem (LTI\LineItem $lineItem) | 
|   | Create a new line-item.  
  | 
|   | 
| bool  | saveLineItem (LTI\LineItem $lineItem) | 
|   | Save a line-item.  
  | 
|   | 
| bool  | deleteLineItem (LTI\LineItem $lineItem) | 
|   | Delete a line-item.  
  | 
|   | 
| LTI LineItem bool  | get () | 
|   | Retrieve a line-item.  
  | 
|   | 
|   | __construct (Platform $platform, string $endpoint, string $path='') | 
|   | Class constructor.  
  | 
|   | 
|   | __construct (Platform $platform, ?string $endpoint) | 
|   | Class constructor.  
  | 
|   | 
| Platform  | getPlatform () | 
|   | Get platform.  
  | 
|   | 
| string  | getScope () | 
|   | Get access scope.  
  | 
|   | 
| HttpMessage  | send (string $method, ?array $parameters=[], string $body='') | 
|   | Send a service request.  
  | 
|   | 
| HttpMessage  | getHttpMessage () | 
|   | Get HttpMessage object for last request.  
  | 
|   | 
 | 
| 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.  
  | 
|   | 
| bool  | $unsigned = false | 
|   | Whether service request should be sent unsigned.  
  | 
|   | 
 | 
| static string  | $SCOPE = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem' | 
|   | Access scope.  
  | 
|   | 
| static string  | $SCOPE_READONLY = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly' | 
|   | Read-only access scope.  
  | 
|   | 
| static int  | $defaultLimit = null | 
|   | 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 Line-item 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()
      
        
          | ceLTIc\LTI\Service\LineItem::__construct  | 
          ( | 
          Platform |           $platform,  | 
        
        
           | 
           | 
          string |           $endpoint,  | 
        
        
           | 
           | 
          ?int |           $limit = null,  | 
        
        
           | 
           | 
          bool |           $pagingMode = false ) | 
        
      
 
Class constructor. 
- Parameters
 - 
  
    | 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  | 
  
   
 
 
◆ createLineItem()
      
        
          | bool ceLTIc\LTI\Service\LineItem::createLineItem  | 
          ( | 
          LTI\LineItem |           $lineItem | ) | 
           | 
        
      
 
Create a new line-item. 
- Parameters
 - 
  
    | LTI\LineItem | $lineItem | Line-item object | 
  
   
- Returns
 - bool True if successful 
 
 
 
◆ deleteLineItem()
      
        
          | bool ceLTIc\LTI\Service\LineItem::deleteLineItem  | 
          ( | 
          LTI\LineItem |           $lineItem | ) | 
           | 
        
      
 
 
◆ get()
      
        
          | LTI LineItem bool ceLTIc\LTI\Service\LineItem::get  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getAll()
      
        
          | LTI LineItem[] bool ceLTIc\LTI\Service\LineItem::getAll  | 
          ( | 
          ?string |           $ltiResourceLinkId = null,  | 
        
        
           | 
           | 
          ?string |           $resourceId = null,  | 
        
        
           | 
           | 
          ?string |           $tag = null,  | 
        
        
           | 
           | 
          ?int |           $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.
- Parameters
 - 
  
    | 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) | 
  
   
- Returns
 - LTI\LineItem[]|bool Array of LineItem objects or false on error 
 
 
 
◆ getLineItem()
  
  
      
        
          | static LTI LineItem bool ceLTIc\LTI\Service\LineItem::getLineItem  | 
          ( | 
          Platform |           $platform,  | 
         
        
           | 
           | 
          string |           $endpoint ) | 
         
       
   | 
  
static   | 
  
 
Retrieve a line-item. 
- Deprecated
 - Use LineItem::fromEndpoint() or get() instead
 
- Parameters
 - 
  
    | Platform | $platform | Platform object for this service request  | 
    | string | $endpoint | Line-item endpoint | 
  
   
- Returns
 - LTI\LineItem|bool LineItem object, or false on error 
 
References ceLTIc\LTI\LineItem\$resourceId.
Referenced by deleteLineItem().
 
 
◆ saveLineItem()
      
        
          | bool ceLTIc\LTI\Service\LineItem::saveLineItem  | 
          ( | 
          LTI\LineItem |           $lineItem | ) | 
           | 
        
      
 
 
◆ $defaultLimit
  
  
      
        
          | int ceLTIc\LTI\Service\LineItem::$defaultLimit = null | 
         
       
   | 
  
static   | 
  
 
Default limit on size of container to be returned from requests. 
 
 
◆ $SCOPE
  
  
      
        
          | string ceLTIc\LTI\Service\LineItem::$SCOPE = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem' | 
         
       
   | 
  
static   | 
  
 
 
◆ $SCOPE_READONLY
  
  
      
        
          | string ceLTIc\LTI\Service\LineItem::$SCOPE_READONLY = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly' | 
         
       
   | 
  
static   | 
  
 
 
◆ MEDIA_TYPE_LINE_ITEM
      
        
          | const ceLTIc\LTI\Service\LineItem::MEDIA_TYPE_LINE_ITEM = 'application/vnd.ims.lis.v2.lineitem+json' | 
        
      
 
 
◆ MEDIA_TYPE_LINE_ITEMS
      
        
          | const ceLTIc\LTI\Service\LineItem::MEDIA_TYPE_LINE_ITEMS = 'application/vnd.ims.lis.v2.lineitemcontainer+json' | 
        
      
 
Line-item container media type.