DoDomuDojade Documentation

UserException extends DomainException
in package

FinalYes

User domain exceptions - contains translation KEYS

Table of Contents

Properties

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

Methods

__construct()  : mixed
cannotDeleteSelf()  : self
Cannot delete an own user account
emptyFields()  : self
Required fields are empty
failedToCreate()  : self
Failed to create user
failedToDelete()  : self
Failed to delete user
invalidId()  : self
Invalid or missing user ID
notFound()  : self
User isn't found in database
unauthorized()  : self
User isn't authorized to perform this action
usernameTaken()  : self
Username already exists

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

cannotDeleteSelf()

Cannot delete an own user account

public static cannotDeleteSelf() : self
Return values
self

emptyFields()

Required fields are empty

public static emptyFields() : self
Return values
self

failedToCreate()

Failed to create user

public static failedToCreate() : self
Return values
self

failedToDelete()

Failed to delete user

public static failedToDelete() : self
Return values
self

invalidId()

Invalid or missing user ID

public static invalidId() : self
Return values
self

notFound()

User isn't found in database

public static notFound(int $id) : self
Parameters
$id : int
Return values
self

unauthorized()

User isn't authorized to perform this action

public static unauthorized() : self
Return values
self

usernameTaken()

Username already exists

public static usernameTaken() : self
Return values
self

        
On this page

Search results