Documentation

REST
in package

This class implements the RESTful transport of apiServiceRequest()'s

Table of Contents

Methods

decodeHttpResponse()  : mixed|null
Decode an HTTP Response.
doExecute()  : array<string|int, mixed>
Executes a Psr\Http\Message\RequestInterface
execute()  : array<string|int, mixed>
Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries when errors occur.
decodeBody()  : mixed
determineExpectedClass()  : mixed
getResponseErrors()  : mixed
isAltMedia()  : mixed

Methods

doExecute()

Executes a Psr\Http\Message\RequestInterface

public static doExecute(Client $client, RequestInterface $request[, string $expectedClass = null ]) : array<string|int, mixed>
Parameters
$client : Client
$request : RequestInterface
$expectedClass : string = null
Tags
throws
Exception

on server side error (ie: not authenticated, invalid or malformed post body, invalid url)

Return values
array<string|int, mixed>

decoded result

execute()

Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries when errors occur.

public static execute(Client $client, RequestInterface $request[, string $expectedClass = null ][, array<string|int, mixed> $config = array() ][, array<string|int, mixed> $retryMap = null ]) : array<string|int, mixed>
Parameters
$client : Client
$request : RequestInterface
$expectedClass : string = null
$config : array<string|int, mixed> = array()
$retryMap : array<string|int, mixed> = null
Tags
throws
Exception

on server side error (ie: not authenticated, invalid or malformed post body, invalid url)

Return values
array<string|int, mixed>

decoded result

determineExpectedClass()

private static determineExpectedClass(mixed $expectedClass[, RequestInterface $request = null ]) : mixed
Parameters
$expectedClass : mixed
$request : RequestInterface = null

getResponseErrors()

private static getResponseErrors(mixed $body) : mixed
Parameters
$body : mixed

        
On this page

Search results