From 4d1c62e006bc896e9ddb59d15dc7a7e30f9eb48e Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 28 Sep 2010 11:04:14 +0200 Subject: [PATCH] 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 --- classes/plabstractiterable.php | 33 +++++++++++++++++++++++++++++++++ classes/pliterable.php | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 classes/plabstractiterable.php create mode 100644 classes/pliterable.php 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 @@ + -- 2.1.4