Since: 8.1

interface UnitEnum (View source)

The UnitEnum interface is automatically applied to all enumerations by the engine. It may not be implemented by user-defined classes. Enumerations may not override its methods, as default implementations are provided by the engine. It is available only for type checks.

Properties

string $name

Methods

static array
cases()

Generates a list of cases on an enum

Details

static array cases()

Generates a list of cases on an enum

This method will return a packed array of all cases in an enumeration, in order of declaration.

Return Value

array