final class EnumType extends ClassLike

Enum description.

Methods

setType(string|null $type)

No description

string|null
getType()

No description

setImplements(array $names)

No description

array
getImplements()

No description

addImplement(string $name)

No description

removeImplement(string $name)

No description

setCases(array $cases)

Sets cases to enum

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

Parameters

string|null $type

Return Value

EnumType

at line 39
string|null getType()

No description

Return Value

string|null

at line 48
EnumType setImplements(array $names)

No description

Parameters

array $names

Return Value

EnumType

at line 57
array getImplements()

No description

Return Value

array

at line 63
EnumType addImplement(string $name)

No description

Parameters

string $name

Return Value

EnumType

at line 71
EnumType removeImplement(string $name)

No description

Parameters

string $name

Return Value

EnumType

at line 82
EnumType setCases(array $cases)

Sets cases to enum

Parameters

array $cases

Return Value

EnumType

at line 95
array getCases()

No description

Return Value

array

at line 102
EnumCase addCase(string $name, Literal|null $value = null, bool $overwrite = false)

Adds case to enum

Parameters

string $name
Literal|null $value
bool $overwrite

Return Value

EnumCase

at line 112
EnumType removeCase(string $name)

No description

Parameters

string $name

Return Value

EnumType

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.

Parameters

TraitUse $member
bool $overwrite

Return Value

EnumType

at line 139
void __clone()

No description

Return Value

void

Traits