From: Florent Bruneau Date: Tue, 28 Sep 2010 09:04:14 +0000 (+0200) Subject: Add interface PlIteraface and the corresponding abstract class X-Git-Tag: core/1.1.1~21 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4d1c62e006bc896e9ddb59d15dc7a7e30f9eb48e;p=platal.git Add interface PlIteraface and the corresponding abstract class PlAbstractIterable. PlIterable aims at providing a common interface for the objects that can produce a PlIterator. It extends PHP's IteratorAggregate that provides an interface for producing a PHP's iterator. PlAbstractIterable provides a default implementation for IteratorAggregate::getIterator. Signed-off-by: Florent Bruneau --- diff --git a/classes/plabstractiterable.php b/classes/plabstractiterable.php new file mode 100644 index 0000000..839f647 --- /dev/null +++ b/classes/plabstractiterable.php @@ -0,0 +1,33 @@ +iterate()); + } +} + +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +?> diff --git a/classes/pliterable.php b/classes/pliterable.php new file mode 100644 index 0000000..2172ec9 --- /dev/null +++ b/classes/pliterable.php @@ -0,0 +1,36 @@ +