FailureRequestEvent
extends AbstractRequestEvent
in package
Class FailureRequestEvent
Tags
Table of Contents
Methods
- __construct() : mixed
- FailureRequestEvent constructor.
- getApiDomain() : string
- Returns RetailCRM domain for request.
- getApiKey() : string
- Returns API key for request in the event.
- getApiUrl() : string
- Returns RetailCRM URL for request in the event without trailing slash.
- getException() : ApiException|ClientException
- Returns an exception instance which will be thrown after event propagation (if not suppressed).
- getRequest() : RequestInterface
- Returns a request for which an event was thrown.
- getResponse() : ResponseInterface|null
- Returns a response for which an event was thrown.
- getResponseArray() : array<int|string, mixed>
- Returns a response array. It will be present only if custom request was used.
- shouldSuppressThrow() : bool
- Returns true if exception should not be thrown.
- suppressThrow() : FailureRequestEvent
- Suppresses exception for the client caller.
Methods
__construct()
FailureRequestEvent constructor.
public
__construct(string $baseUrl, RequestInterface $request, ResponseInterface|null $response, ApiException|ClientException $exception[, array<int|string, mixed> $responseArray = [] ]) : mixed
Parameters
- $baseUrl : string
- $request : RequestInterface
- $response : ResponseInterface|null
- $exception : ApiException|ClientException
- $responseArray : array<int|string, mixed> = []
getApiDomain()
Returns RetailCRM domain for request.
public
getApiDomain() : string
Return values
stringgetApiKey()
Returns API key for request in the event.
public
getApiKey() : string
Return values
stringgetApiUrl()
Returns RetailCRM URL for request in the event without trailing slash.
public
getApiUrl() : string
Return values
stringgetException()
Returns an exception instance which will be thrown after event propagation (if not suppressed).
public
getException() : ApiException|ClientException
Return values
ApiException|ClientExceptiongetRequest()
Returns a request for which an event was thrown.
public
getRequest() : RequestInterface
Return values
RequestInterfacegetResponse()
Returns a response for which an event was thrown.
public
getResponse() : ResponseInterface|null
Return values
ResponseInterface|nullgetResponseArray()
Returns a response array. It will be present only if custom request was used.
public
getResponseArray() : array<int|string, mixed>
Return values
array<int|string, mixed>shouldSuppressThrow()
Returns true if exception should not be thrown.
public
shouldSuppressThrow() : bool
Return values
boolsuppressThrow()
Suppresses exception for the client caller.
public
suppressThrow() : FailureRequestEvent