Méthode |
Description |
|
__callStatic ( string $name, array $arguments ) : static |
Returns a value when called statically like so: MyEnum::SOME_VALUE() given SOME_VALUE is a class constant |
|
__construct ( mixed $value ) |
Creates a new value of some type |
|
__toString ( ) : string |
|
|
equals ( Enum $enum ) : boolean |
Compares one Enum with another. |
|
getKey ( ) : mixed |
Returns the enum key (i.e. the constant name). |
|
getValue ( ) : mixed |
|
|
isValid ( $value ) : boolean |
Check if is valid enum value |
|
isValidKey ( $key ) : boolean |
Check if is valid enum key |
|
keys ( ) : array |
Returns the names (keys) of all constants in the Enum class |
|
search ( $value ) : mixed |
Return key for value |
|
toArray ( ) : array |
Returns all possible values as an array |
|
values ( ) : static[] |
Returns instances of the Enum class of all Enum constants |
|