ANAFResponse
in package
AbstractYes
Represents the base structure for some ANAF API responses
Tags
Table of Contents
Properties
- $LastError : Throwable|null
- $rawResponse : string|null
Methods
- CreateError() : ANAFResponse
- HasError() : bool
- IsSuccess() : bool
- Parse() : void
- CommonParseJSON() : stdClass|array<string|int, mixed>|null
- InternalCreateError() : void
- Utility method for implementers to create an error
Properties
$LastError
public
Throwable|null
$LastError
= null
$rawResponse
public
string|null
$rawResponse
= null
Methods
CreateError()
public
abstract static CreateError(Throwable $error) : ANAFResponse
Parameters
- $error : Throwable
Return values
ANAFResponseHasError()
public
HasError() : bool
Return values
boolIsSuccess()
public
IsSuccess() : bool
Return values
boolParse()
public
abstract 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