Interface

TRex\Core\IEnum

interface IEnum

Enum represents a value in a possible list.

This ensures having a value among the constants of your class and prevents any other value.

Methods

__construct(mixed $value)

Constructor.

array getConstList()

Returns the list of the possible values.

mixed getValue()

Returns the current value.

bool is(mixed $expectedValue)

Indicates whether the current value is $expectedValue.

Details

at line 19
public __construct(mixed $value)

Constructor.

Parameters

mixed $value

at line 26
public array getConstList()

Returns the list of the possible values.

Return Value

array

at line 33
public mixed getValue()

Returns the current value.

Return Value

mixed

at line 41
public bool is(mixed $expectedValue)

Indicates whether the current value is $expectedValue.

Parameters

mixed $expectedValue

Return Value

bool