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

Class to implement a service. More...

Inheritance diagram for Service:
Membership ToolSettings

Public Member Functions

 __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...
 

Data Fields

 $unsigned = false
 Whether service request should be sent unsigned. More...
 

Protected Attributes

 $endpoint
 Service endpoint. More...
 

Detailed Description

Class to implement a 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 Service.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $consumer,
  $endpoint,
  $mediaType 
)

Class constructor.

Parameters
ToolConsumer$consumerTool consumer object for this service request
string$endpointService endpoint
string$mediaTypeMedia type of message body

Definition at line 62 of file Service.php.

References Service\$endpoint.

Member Function Documentation

◆ getHTTPMessage()

getHTTPMessage ( )

Get HTTPMessage object for last request.

Returns
HTTPMessage HTTP object containing request and response details

Definition at line 114 of file Service.php.

◆ send()

send (   $method,
  $parameters = array(),
  $body = null 
)

Send a service request.

Parameters
string$methodThe action type constant (optional, default is GET)
array$parametersQuery parameters to add to endpoint (optional, default is none)
string$bodyBody of request (optional, default is null)
Returns
HTTPMessage HTTP object containing request and response details

Definition at line 78 of file Service.php.

References Service\$endpoint.

Referenced by Membership\get(), and ToolSettings\get().

Field Documentation

◆ $endpoint

string $endpoint
protected

◆ $unsigned

bool $unsigned = false

Whether service request should be sent unsigned.

Definition at line 25 of file Service.php.


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