Class to implement a service. More...
Public Member Functions | |
| __construct ($platform, $endpoint) | |
| Class constructor. | |
| ToolConsumer | getConsumer () |
| Get tool consumer. | |
| Platform | getPlatform () |
| Get platform. | |
| string | getScope () |
| Get access scope. | |
| HttpMessage | send ($method, $parameters=array(), $body=null) |
| Send a service request. | |
| HttpMessage | getHttpMessage () |
| Get HttpMessage object for last request. | |
Public Attributes | |
| bool | $unsigned = false |
| Whether service request should be sent unsigned. | |
Protected Member Functions | |
| array | parseContextsInArray ($contexts, $arr) |
| Parse the JSON for context references. | |
Protected Attributes | |
| string | $endpoint = null |
| Service endpoint. | |
| string | $scope = null |
| Service access scope. | |
| string | $mediaType = null |
| Media type of message body. | |
Class to implement a service.
| __construct | ( | $platform, | |
| $endpoint | |||
| ) |
Class constructor.
| Platform | $platform | Platform object for this service request |
| string | $endpoint | Service endpoint |
Reimplemented in Score, and AssessmentControl.
| ToolConsumer getConsumer | ( | ) |
Get tool consumer.
| HttpMessage getHttpMessage | ( | ) |
Get HttpMessage object for last request.
References Service\getHttpMessage().
Referenced by Service\getHttpMessage().
| Platform getPlatform | ( | ) |
Get platform.
References Service\getPlatform().
Referenced by Service\getPlatform().
| string getScope | ( | ) |
Get access scope.
References Service\getScope().
Referenced by Service\getScope().
|
protected |
Parse the JSON for context references.
| object | $contexts | JSON contexts |
| array | $arr | Array to be parsed |
| HttpMessage send | ( | $method, | |
$parameters = array(), |
|||
$body = null |
|||
| ) |
Send a service request.
| string | $method | The action type constant (optional, default is GET) |
| array | $parameters | Query parameters to add to endpoint (optional, default is none) |
| string | $body | Body of request (optional, default is null) |
Referenced by Score\submit().
|
protected |
|
protected |
Media type of message body.
$mediaType
|
protected |
Service access scope.
$scope
| bool $unsigned = false |
Whether service request should be sent unsigned.
$unsigned