SurveyResponse
in package
This class is responsible for preparing and building the whole response for PatcherSurvey
Table of Contents
Properties
- $exceptionErrors : ExceptionErrors
- $tempIdMapping : TempIdMapping
- $validationErrors : ValidationErrors
- $isValidOperation : bool
- $operationsApplied : int
Methods
- __construct() : mixed
- buildResponseObject() : array<string|int, mixed>
- extractTempIdMapping() : void
- Extracts possible tempIdMapping from the $operationData array
- extractValidationErrors() : void
- Extracts possible validationErrors from the $operationData array
- handleException() : void
- handleResponse() : void
- incrementOperationsApplied() : void
Properties
$exceptionErrors
protected
ExceptionErrors
$exceptionErrors
$tempIdMapping
protected
TempIdMapping
$tempIdMapping
$validationErrors
protected
ValidationErrors
$validationErrors
$isValidOperation
private
bool
$isValidOperation
= true
$operationsApplied
private
int
$operationsApplied
= 0
Methods
__construct()
public
__construct(TempIdMapping $tempIdMapping, ValidationErrors $validationErrors, ExceptionErrors $exceptionErrors) : mixed
Parameters
- $tempIdMapping : TempIdMapping
- $validationErrors : ValidationErrors
- $exceptionErrors : ExceptionErrors
buildResponseObject()
public
buildResponseObject() : array<string|int, mixed>
Return values
array<string|int, mixed>extractTempIdMapping()
Extracts possible tempIdMapping from the $operationData array
public
extractTempIdMapping(array<string|int, mixed> $handleResponse) : void
Parameters
- $handleResponse : array<string|int, mixed>
Tags
extractValidationErrors()
Extracts possible validationErrors from the $operationData array
public
extractValidationErrors(array<string|int, mixed> $handleResponse) : void
Parameters
- $handleResponse : array<string|int, mixed>
Tags
handleException()
public
handleException(Exception $e, OpInterface $patchOpData) : void
Parameters
- $e : Exception
- $patchOpData : OpInterface
handleResponse()
public
handleResponse(array<string|int, mixed> $response) : void
Parameters
- $response : array<string|int, mixed>
incrementOperationsApplied()
public
incrementOperationsApplied() : void