All notable changes to EnumHelper
will be documented in this file.
- Added
CasesIndexedByName
trait, providing acasesIndexedByName()
method to return an associative array of cases with the case name as the index, rather than an enumerated array that is returned bycases()
.
- Added
EnumValidatableCase
trait, providing anisValidCase()
method to validate a string value against the set of case names defined for an enum.
-
Initial release
Created
EnumValidatableCase
trait, providing afromName()
method that allows a string value which matches an enum case to be used to create an instance of that enum.