ANAFErrorAnswer
extends ANAFResponse
in package
Used for error answers found during DownloadAnswer
Tags
Table of Contents
Properties
- $AnswerID : string
- $cif_emitent : string|null
- $data_incarcare : string|null
- $index_incarcare : string|null
- $LastError : Throwable|null
- $message : string|null
- $rawResponse : string|null
Methods
- Create() : ANAFErrorAnswer
- Creează un obiect de tip ANAFDownloadedFileError dintr-un răspuns XML.
- CreateError() : ANAFErrorAnswer
- Creează un obiect de tip ANAFDownloadedFileError dintr-o excepție.
- HasError() : bool
- IsDuplicateUploadError() : bool
- IsExpectedErrorFormat() : bool
- IsSuccess() : bool
- IsSupported() : bool
- Checks for SimpleXML and libxml support in the current PHP environment.
- Parse() : void
- CommonParseJSON() : stdClass|array<string|int, mixed>|null
- InternalCreateError() : void
- Utility method for implementers to create an error
Properties
$AnswerID
public
string
$AnswerID
$cif_emitent
public
string|null
$cif_emitent
= null
$data_incarcare
public
string|null
$data_incarcare
= null
$index_incarcare
public
string|null
$index_incarcare
= null
$LastError
public
Throwable|null
$LastError
= null
$message
public
string|null
$message
= null
$rawResponse
public
string|null
$rawResponse
= null
Methods
Create()
Creează un obiect de tip ANAFDownloadedFileError dintr-un răspuns XML.
public
static Create(string $id, string $rawResponse) : ANAFErrorAnswer
Parameters
- $id : string
- $rawResponse : string
Return values
ANAFErrorAnswerCreateError()
Creează un obiect de tip ANAFDownloadedFileError dintr-o excepție.
public
static CreateError(Throwable $error) : ANAFErrorAnswer
Parameters
- $error : Throwable
Return values
ANAFErrorAnswerHasError()
public
HasError() : bool
Return values
boolIsDuplicateUploadError()
public
IsDuplicateUploadError() : bool
Return values
boolIsExpectedErrorFormat()
public
static IsExpectedErrorFormat(string $rawContent) : bool
Parameters
- $rawContent : string
Return values
boolIsSuccess()
public
IsSuccess() : bool
Return values
boolIsSupported()
Checks for SimpleXML and libxml support in the current PHP environment.
public
static IsSupported() : 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