A PHP implementation of Enumerators as described by Java