ModuleException
extends DomainException
in package
FinalYes
Module domain exceptions - contains translation KEYS
Table of Contents
Properties
- $context : array<string|int, mixed>
- $errorCode : string
- $httpStatusCode : int
Methods
- __construct() : mixed
- failedToToggle() : self
- Failed to toggle module
- failedToUpdate() : self
- Failed to update module
- invalidEndTime() : self
- Thrown when end time is incorrect
- invalidId() : self
- Invalid or missing module ID
- invalidName() : self
- Thrown when moudle with given name not found
- invalidStartTime() : self
- Thrown when start time is invaalid
- notFound() : self
- Module isn't found in a database
- startTimeGreaterThanEndTime() : self
- Thrown when start time is greater than end time
Properties
$context read-only
public
array<string|int, mixed>
$context
= []
$errorCode read-only
public
string
$errorCode
$httpStatusCode read-only
public
int
$httpStatusCode
= 400
Methods
__construct()
public
__construct(string $message, string $errorCode[, int $httpStatusCode = 400 ][, array<string|int, mixed> $context = [] ][, Throwable|null $previous = null ]) : mixed
Parameters
- $message : string
- $errorCode : string
- $httpStatusCode : int = 400
- $context : array<string|int, mixed> = []
- $previous : Throwable|null = null
failedToToggle()
Failed to toggle module
public
static failedToToggle() : self
Return values
selffailedToUpdate()
Failed to update module
public
static failedToUpdate() : self
Return values
selfinvalidEndTime()
Thrown when end time is incorrect
public
static invalidEndTime(DateTimeImmutable $endTime) : self
Parameters
- $endTime : DateTimeImmutable
Return values
selfinvalidId()
Invalid or missing module ID
public
static invalidId() : self
Return values
selfinvalidName()
Thrown when moudle with given name not found
public
static invalidName(string $name) : self
Parameters
- $name : string
Return values
selfinvalidStartTime()
Thrown when start time is invaalid
public
static invalidStartTime(DateTimeImmutable $startTime) : self
Parameters
- $startTime : DateTimeImmutable
Return values
selfnotFound()
Module isn't found in a database
public
static notFound([int|null $id = null ]) : self
Parameters
- $id : int|null = null
Return values
selfstartTimeGreaterThanEndTime()
Thrown when start time is greater than end time
public
static startTimeGreaterThanEndTime(DateTimeImmutable $startTime, DateTimeImmutable $endTime) : self
Parameters
- $startTime : DateTimeImmutable
- $endTime : DateTimeImmutable