RefusalStatus
final class RefusalStatus (View source)
The one place a Domain refusal becomes an HTTP status. API controllers call this where they used to read a status number off the result.
Methods
static int
of(Refusal $refusal)
No description
static int
ofResult(array $result, int $default = 400)
Status for a ['success' => false, ...] array: a Domain result carries a refusal, an Application-built one may still carry a status number.
Details
static int
of(Refusal $refusal)
No description
static int
ofResult(array $result, int $default = 400)
Status for a ['success' => false, ...] array: a Domain result carries a refusal, an Application-built one may still carry a status number.