myclabs/php-enum — pull request #5 by danielcosta (2014-10-19 03:52:30+00:00)
Title: Added new methods and changed source structure to be PSR4 compatible

- PSR4 compatible package
- new getKey() method (returns the key of the current value on Enum)
- new keys() method (returns the names (keys) of all constants in the Enum class)
- moved toArray() to values() method (returns all possible values as an array)
- flagged toArray() as deprecated for future removal
- new isValid() static method (check if tested value is valid on enum set)
- new isValidKey() static method (check if tested key is valid on enum set)
- new search() method (return key for searched value)