Hi,
> > > >> > > This ones are predefinded by the zend engine:
> > > >> > > Traversable
> > > >> > > IteratorAggregate
> > > >> > > Iterator
> > > >> > > ArrayAccess
> > >
> > > All these four are part of the engine. (They were in a different form
> > > part of spl a long time ago).
> >
> > Should those predifined interfaces go to an appendix?
> >
> > Friedhelm
>
> The subject of interfaces/iterators/etc... is difficult to document, as
> this is new to PHP.
yes, maybe, but this is no valid reason to _not_ document them ;-)
> Those interface are used by SPL, that implements them. I don't really know
> if they are usefull to a user...
Yes maybe they are used by SPL, but as Marcus said, these interfaces are
defined by the Zend Engine 2 (read his answer above), and of course they are
usefull.
> For example, Transversable is just:
> interface Traversable
> {
> }
>
> This interface *cannot* be used by PHP scripts, so there is no point in
> documenting it.... (maybe it can go to the developpers manual).
>
>
> The interface is something like:
> interface Iterator extends Traversable
> {
> function rewind();
> function current();
> function key();
> function next();
> function valid();
> }
>
> Why do you need this? Maybe someone could explain me, but it seems pretty
> unusefull....
Please have a look at http://www.php.net/zend-engine-2.php the section
Iteration to see how this can be usefull for userland PHP-Skripts.
>
> More info at great Marcus' website:
> interfaces: http://marcus-boerger.de/php/ext/spl/spl.phps
> SPL docs: http://marcus-boerger.de/php/ext/spl/html/ or
> http://marcus-boerger.de/php/ext/spl/spl.chm
Thx, I know ;-)
Friedhelm