Class to implement a service.
More...
|
bool | $unsigned = false |
| Whether service request should be sent unsigned.
|
|
|
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 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
- Copyright
- SPV Software Products
- Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3
◆ __construct()
__construct |
( |
Platform | $platform, |
|
|
?string | $endpoint ) |
Class constructor.
- Parameters
-
Platform | $platform | Platform object for this service request |
string | null | $endpoint | Service endpoint |
◆ getHttpMessage()
Get HttpMessage object for last request.
- Returns
- HttpMessage HTTP object containing request and response details
◆ getPlatform()
Get platform.
- Returns
- Platform Platform for this service
◆ getScope()
Get access scope.
- Returns
- string Access scope
◆ parseContextsInArray()
array parseContextsInArray |
( |
object|array | $contexts, |
|
|
array | $arr ) |
|
protected |
Parse the JSON for context references.
- Parameters
-
object | array | $contexts | JSON contexts |
array | $arr | Array to be parsed |
- Returns
- array Parsed array
◆ send()
HttpMessage send |
( |
string | $method, |
|
|
?array | $parameters = [], |
|
|
string | $body = '' ) |
Send a service request.
- Parameters
-
string | $method | The action type constant (optional, default is GET) |
array | null | $parameters | Query parameters to add to endpoint (optional, default is none) |
string | $body | Body of request (optional, default is null) |
- Returns
- HttpMessage HTTP object containing request and response details
Referenced by Groups\get(), and LineItem\saveLineItem().