Using an iterator interface is both simple and usefull in moderm oriented object programming.
The aim of this interface is to standardize the way resources (of any kind) may be accessed and used whichever library they come from and whatever the underlying data is.
At this very time, there's not 'common' Iterator interface in PEAR, the Types package try to define one.
It should be easy for developpers to create their own Iterable and Iterator objects which will work with any Iterator aware application.
The common example is a file based system which retrieve its data line per line. If we decide to replace it with a database system, in standard programming, the way the application loop over resources will have to be modified and no 'going back' will be possible unless parameters and tests. With an Iterator interface, the application does not worry about where resources come from, it just iterate over these resources.
Using Iterators in PEAR libraries should allow developpers to share their resources more easily.
Changing from a database system library to a more performant one whould result in fewer code modification if these libraries use a common result iterator.
Making a library more resource type independant should be easier too as the library won't worry about parameters type (DB_Result, array, associative array, File, ... ?) if the parameter has to be an Iterator object.