Error
in package
Table of Contents
Methods
- getErrorFromCode() : array<string|int, mixed>
- setError() : object
- Sets the error in the provided response object based on the given error code.
Methods
getErrorFromCode()
public
static getErrorFromCode(string $errorCode) : array<string|int, mixed>
Parameters
- $errorCode : string
Return values
array<string|int, mixed>setError()
Sets the error in the provided response object based on the given error code.
public
static setError(object $rep, mixed $errorCode[, string $errorCustomMessage = '' ]) : object
Parameters
- $rep : object
-
the response object to which the error details will be assigned
- $errorCode : mixed
-
the error code used to identify the error details from the predefined array
- $errorCustomMessage : string = ''
-
custom message, for example about specific vars that would be bad written
Return values
object —returns the updated response object containing the error details