RetailCRM API Client

RequestSender extends AbstractApiResourceGroup
in package
implements RequestSenderInterface Uses BaseUrlAwareTrait

Class RequestSender

Tags
category

RequestSender

Table of Contents

Interfaces

RequestSenderInterface
Interface RequestSenderInterface

Methods

__construct()  : mixed
host()  : string
Returns host from the base URL.
route()  : string
Returns API routes with base URI prepended.
send()  : array<int|string, mixed>
Sends custom request to provided route with provided method and body, returns array response.

Methods

__construct()

public __construct(AbstractApiResourceGroup $resourceGroup) : mixed
Parameters
$resourceGroup : AbstractApiResourceGroup

host()

Returns host from the base URL.

public host() : string
Tags
inheritDoc
Return values
string

route()

Returns API routes with base URI prepended.

public route(string $route) : string
Parameters
$route : string
Tags
inheritDoc
Return values
string

send()

Sends custom request to provided route with provided method and body, returns array response.

public send(string $method, string $route[, array<int|string, mixed> $requestForm = [] ]) : array<int|string, mixed>

Request will be put into GET parameters or into POST form-data (depends on method).

Note: do not remove "useless" exceptions which are marked as "never thrown" by IDE. PSR-18's ClientInterface doesn't have them in the DocBlock, but, according to PSR-18, they can be thrown by clients, and therefore should be present here.

Parameters
$method : string
$route : string
$requestForm : array<int|string, mixed> = []
Tags
see
https://www.php-fig.org/psr/psr-18/#error-handling
throws
ApiException
throws
ClientException
throws
HandlerException
throws
ApiExceptionInterface
SuppressWarnings

(PHPMD.ElseExpression)

Return values
array<int|string, mixed>

        
On this page

Search results