DoDomuDojade Documentation

AnnouncementException extends DomainException
in package

FinalYes

Announcement domain exceptions

Table of Contents

Properties

$context  : array<string|int, mixed>
$errorCode  : string
$httpStatusCode  : int

Methods

__construct()  : mixed
emptyText()  : self
Text is empty or too short
emptyTitle()  : self
Title is empty or too short
expirationInThePast()  : self
Thrown when the expiration date is in the past
expirationTooFarInFuture()  : self
Set expiration date is too far in the future
failedToDelete()  : self
Failed to delete an announcement
failedToUpdate()  : self
Failed to update an announcement
failedToUpdateStatus()  : self
Failed to change the status of an announcement
invalidId()  : self
Invalid or missing announcement ID
invalidStatus()  : self
Invalid announcement status
notFound()  : self
Announcement isn't found in a database
textTooLong()  : self
Text is too long
textTooShort()  : self
Text is too short
titleTooLong()  : self
Title is too long
titleTooShort()  : self
Title is too short

Properties

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

emptyTitle()

Title is empty or too short

public static emptyTitle() : self
Return values
self

expirationInThePast()

Thrown when the expiration date is in the past

public static expirationInThePast() : self
Return values
self

expirationTooFarInFuture()

Set expiration date is too far in the future

public static expirationTooFarInFuture() : self
Return values
self

failedToUpdate()

Failed to update an announcement

public static failedToUpdate() : self
Return values
self

failedToUpdateStatus()

Failed to change the status of an announcement

public static failedToUpdateStatus() : self
Return values
self

invalidStatus()

Invalid announcement status

public static invalidStatus(string $status) : self
Parameters
$status : string
Return values
self

textTooLong()

Text is too long

public static textTooLong(int $maxTextLength) : self
Parameters
$maxTextLength : int
Return values
self

textTooShort()

Text is too short

public static textTooShort(int $minTextLength) : self
Parameters
$minTextLength : int
Return values
self

titleTooLong()

Title is too long

public static titleTooLong(int $maxTitleLength) : self
Parameters
$maxTitleLength : int
Return values
self

titleTooShort()

Title is too short

public static titleTooShort(int $minTitleLength) : self
Parameters
$minTitleLength : int
Return values
self

        
On this page

Search results