PagedAnswerListResponse
extends ANAFAnswerListResponse
in package
Pseudo response for unifying multiple paged answer lists into a single response
Tags
Table of Contents
Properties
- $cui : string
- $ErrorPages : array<string|int, InternalPagedAnswersResponse>
- Stores a reference to the original errors
- $LastError : Throwable|null
- $mesaje : array<string|int, ANAFAnswer>
- $PageCount : int
- Total number of pages
- $Pages : array<string|int, InternalPagedAnswersResponse>
- Stores a reference to the original responses NOTE: empty responses (no messages) are not stored
- $rawResponse : string|null
- $serial : string
- $titlu : string
Methods
- __construct() : void
- Create() : PagedAnswerListResponse
- CreateError() : ANAFAnswerListResponse
- Create an error response For internal use!
- HasError() : bool
- IsSuccess() : bool
- Parse() : void
- CommonParseJSON() : stdClass|array<string|int, mixed>|null
- InternalCreateError() : void
- Utility method for implementers to create an error
- CopyFromParsed() : void
Properties
$cui
public
string
$cui
$ErrorPages
Stores a reference to the original errors
public
array<string|int, InternalPagedAnswersResponse>
$ErrorPages
$LastError
public
Throwable|null
$LastError
= null
$mesaje
public
array<string|int, ANAFAnswer>
$mesaje
$PageCount
Total number of pages
public
int
$PageCount
$Pages
Stores a reference to the original responses NOTE: empty responses (no messages) are not stored
public
array<string|int, InternalPagedAnswersResponse>
$Pages
$rawResponse
public
string|null
$rawResponse
= null
$serial
public
string
$serial
$titlu
public
string
$titlu
Methods
__construct()
public
__construct(array<string|int, InternalPagedAnswersResponse> $responses, array<string|int, InternalPagedAnswersResponse> $errors) : void
Parameters
- $responses : array<string|int, InternalPagedAnswersResponse>
- $errors : array<string|int, InternalPagedAnswersResponse>
Create()
public
static Create(mixed $rawResponse) : PagedAnswerListResponse
Parameters
- $rawResponse : mixed
Return values
PagedAnswerListResponseCreateError()
Create an error response For internal use!
public
static CreateError(Throwable $error) : ANAFAnswerListResponse
Parameters
- $error : Throwable
Return values
ANAFAnswerListResponseHasError()
public
HasError() : bool
Return values
boolIsSuccess()
public
IsSuccess() : bool
Return values
boolParse()
public
Parse() : void
CommonParseJSON()
protected
CommonParseJSON(string|null $response) : stdClass|array<string|int, mixed>|null
Parameters
- $response : string|null
Return values
stdClass|array<string|int, mixed>|nullInternalCreateError()
Utility method for implementers to create an error
protected
InternalCreateError(string $message[, int $code = ANAFException::UNKNOWN_ERROR ][, Throwable|null $previous = null ]) : void
Parameters
- $message : string
- $code : int = ANAFException::UNKNOWN_ERROR
- $previous : Throwable|null = null
CopyFromParsed()
private
CopyFromParsed(stdClass $parsed) : void
Parameters
- $parsed : stdClass