final class ApiKeyWriteResult (View source)

Outcome of an API key write: the saved key on success, otherwise the reason, its code and the refusal.

Constants

ERR_API_DISABLED

ERR_FORBIDDEN

ERR_LIMIT

ERR_NOT_FOUND

ERR_WRITE

Methods

ok(ApiKey|null $key = null)

No description

refused(string $code, string $message, Refusal $refusal)

No description

Details

static ApiKeyWriteResult ok(ApiKey|null $key = null)

No description

Parameters

ApiKey|null $key

Return Value

ApiKeyWriteResult

static ApiKeyWriteResult refused(string $code, string $message, Refusal $refusal)

No description

Parameters

string $code
string $message
Refusal $refusal

Return Value

ApiKeyWriteResult