PHP Enum implementation inspired from SplEnum