ResponseTranslator
in package
HEXONET ResponseTranslator
Table of Contents
- $descriptionRegexMap : array<string|int, mixed>
- hidden class var of API description regex mappings for translation
- translate() : string
- translate a raw api response
Properties
$descriptionRegexMap
hidden class var of API description regex mappings for translation
private
static array<string|int, mixed>
$descriptionRegexMap
= ["Authorization failed; Operation forbidden by ACL" => "Authorization failed; Used Command `{COMMAND}` not white-listed by your Access Control List", "Request is not available; DOMAIN TRANSFER IS PROHIBITED BY STATUS (clientTransferProhibited)/WRONG AUTH" => "This Domain is locked and the given Authorization Code is wrong. Initiating a Transfer is therefore impossible.", "Request is not available; DOMAIN TRANSFER IS PROHIBITED BY STATUS (clientTransferProhibited)" => "This Domain is locked. Initiating a Transfer is therefore impossible.", "Request is not available; DOMAIN TRANSFER IS PROHIBITED BY STATUS (requested)" => "Registration of this Domain Name has not yet completed. Initiating a Transfer is therefore impossible.", "Request is not available; DOMAIN TRANSFER IS PROHIBITED BY STATUS (requestedcreate)" => "Registration of this Domain Name has not yet completed. Initiating a Transfer is therefore impossible.", "Request is not available; DOMAIN TRANSFER IS PROHIBITED BY STATUS (requesteddelete)" => "Deletion of this Domain Name has been requested. Initiating a Transfer is therefore impossible.", "Request is not available; DOMAIN TRANSFER IS PROHIBITED BY STATUS (pendingdelete)" => "Deletion of this Domain Name is pending. Initiating a Transfer is therefore impossible.", "Request is not available; DOMAIN TRANSFER IS PROHIBITED BY WRONG AUTH" => "The given Authorization Code is wrong. Initiating a Transfer is therefore impossible.", "Request is not available; DOMAIN TRANSFER IS PROHIBITED BY AGE OF THE DOMAIN" => "This Domain Name is within 60 days of initial registration. Initiating a Transfer is therefore impossible."]
Methods
translate()
translate a raw api response
public
static translate(string $raw, array<string|int, mixed> $cmd[, array<string|int, mixed> $ph = [] ]) : string
Parameters
- $raw : string
-
API raw response
- $cmd : array<string|int, mixed>
-
requested API command
- $ph : array<string|int, mixed> = []
-
list of place holder vars