EnumType
final class EnumType extends ClassLike
Enum description.
Methods
string|null
getType()
No description
setImplements(array $names)
No description
array
getImplements()
No description
addImplement(string $name)
No description
removeImplement(string $name)
No description
array
getCases()
No description
addCase(string $name, Literal|null $value = null, bool $overwrite = false)
Adds case to enum
removeCase(string $name)
No description
addMember(TraitUse $member, bool $overwrite = false)
Adds a member. If it already exists, throws an exception or overwrites it if $overwrite is true.
void
__clone()
No description
Details
at line 32
EnumType
setType(string|null $type)
No description
at line 39
string|null
getType()
No description
at line 48
EnumType
setImplements(array $names)
No description
at line 57
array
getImplements()
No description
at line 63
EnumType
addImplement(string $name)
No description
at line 71
EnumType
removeImplement(string $name)
No description
at line 82
EnumType
setCases(array $cases)
Sets cases to enum
at line 95
array
getCases()
No description
at line 102
EnumCase
addCase(string $name, Literal|null $value = null, bool $overwrite = false)
Adds case to enum
at line 112
EnumType
removeCase(string $name)
No description
at line 122
EnumType
addMember(TraitUse $member, bool $overwrite = false)
Adds a member. If it already exists, throws an exception or overwrites it if $overwrite is true.
at line 139
void
__clone()
No description