Closed
Description
When using this library, I was slightly surprised to find that the toArray() method returns an associative array mapping the enum constant names to their underlying values, rather than to instances of the enum object wrapping the value. When adding additional behavior to the enum via instance methods, having the enum objects is often more useful than only the underlying constant values.
What do you think of adding a static method, e.g. getInstances(), returning an array mapping constant names to object instances?