phpDocumentor

OrderIdMappingWriter

Class OrderIdMappingWriter

Table of Contents

ERROR_INTEGRITY_VIOLATION  = 'Integrity constraint violation'
$connection  : Connection
__construct()  : mixed
OrderIdMappingWriter constructor.
save()  : void
Saves the afterbuy order id mapping in the 'afterbuy_orders' table.
enhanceErrorMessage()  : string
Enhances error messages by appending useful information from the current context to the given message.
isIntegrityConstraintViolation()  : bool
Checks if error message contains integrity constraint violation in the error message.
throwAlreadyMappedException()  : void
Throws an `AfterbuyOrderIdConstraintViolationException` containing useful information about what went wrong.

Constants

ERROR_INTEGRITY_VIOLATION

private mixed ERROR_INTEGRITY_VIOLATION = 'Integrity constraint violation'

Properties

Methods

__construct()

OrderIdMappingWriter constructor.

public __construct(Connection $connection) : mixed
Parameters
$connection : Connection
Return values
mixed

enhanceErrorMessage()

Enhances error messages by appending useful information from the current context to the given message.

private enhanceErrorMessage(string $message, string $xmlResponse, string $errorMessage, AfterbuyOrderIdMapping $orderIdMapping) : string

Returns the enhanced error message, containing the Afterbuy- and Shop order id and additionally the XML-Response of the Afterbuy Shop-API call.

Parameters
$message : string
$xmlResponse : string
$errorMessage : string
$orderIdMapping : AfterbuyOrderIdMapping
Return values
string

isIntegrityConstraintViolation()

Checks if error message contains integrity constraint violation in the error message.

private isIntegrityConstraintViolation(string $errorMessage) : bool
Parameters
$errorMessage : string
Return values
bool

Search results