RetailCRM API Client

ResponseTransformer implements ResponseTransformerInterface

Class ResponseTransformer

Tags
category

ResponseTransformer

Table of Contents

Interfaces

ResponseTransformerInterface
Interface ResponseTransformerInterface

Methods

__construct()  : mixed
ResponseTransformer constructor.
createCustomResponse()  : array<int|string, mixed>
Transforms PSR-7 response into response array.
createResponse()  : ResponseInterface
Transforms PSR-7 response into response model.
getHandler()  : HandlerInterface|null
Returns HandlerInterface.

Methods

createCustomResponse()

Transforms PSR-7 response into response array.

public createCustomResponse(string $baseUrl, RequestInterface $request, ResponseInterface $response) : array<int|string, mixed>

You can alter the results by providing your chain of handlers.

Parameters
$baseUrl : string
$request : RequestInterface
$response : ResponseInterface
Tags
throws
HandlerException
throws
ApiExceptionInterface
Return values
array<int|string, mixed>

createResponse()

Transforms PSR-7 response into response model.

public createResponse(string $baseUrl, RequestInterface $request, ResponseInterface $response, string $type) : ResponseInterface

You can alter the results by providing your chain of handlers.

Parameters
$baseUrl : string
$request : RequestInterface
$response : ResponseInterface
$type : string
Tags
throws
HandlerException
throws
ApiExceptionInterface
Return values
ResponseInterface

        
On this page

Search results