ReflectionEnum::getCasesReturns a list of all cases on an Enum Description
public array ReflectionEnum::getCases()
An Enum may contain zero or more cases. This method retrieves all defined cases, in lexical order (that is, the order they appear in the source code). ParametersThis function has no parameters. Return ValuesAn array of Enum reflection objects, one for each case in the Enum. For a Unit Enum, they will all be instances of ReflectionEnumUnitCase. For a Backed Enum, they will all be instances of ReflectionEnumBackedCase. Examples
Example #1 ReflectionEnum::getCases example
The above example will output: enum(Suit::Hearts) enum(Suit::Diamonds) enum(Suit::Clubs) enum(Suit::Spades) |