I’ve published my Enum class, formally available as a Gist, to Packagist. View the repository on GitHub.
In a current project I needed to solve a problem where I wanted a class to only accept a set list of string values in a setter. In other languages you could use an enum to easily solve this. Unfortunately, PHP does not have anything like an enum natively. I needed to come up with […]