IntBackedEnum
interface IntBackedEnum implements BackedEnum (View source)
internal | Internal interface to ensure precise type inference |
Properties
int | $value |
Methods
static BackedEnum
from(int|string $value)
Translates an int into the corresponding Enum
case, if any. If there is no matching case defined, it will throw a
ValueError
.
static BackedEnum|null
tryFrom(int|string $value)
Translates an int into the corresponding Enum
case, if any. If there is no matching case defined, it will return null.
Details
static array
cases()
No description
static BackedEnum
from(int|string $value)
Translates an int into the corresponding Enum
case, if any. If there is no matching case defined, it will throw a
ValueError
.
static BackedEnum|null
tryFrom(int|string $value)
Translates an int into the corresponding Enum
case, if any. If there is no matching case defined, it will return null.