Traversable
Interface for Custom IteratorsTraversable
Interface for Custom IteratorsThe Traversable
interface allows your objects to be used in foreach
loops. Implementing this interface enables you to define custom iteration behavior for your classes.