From 9d865d031dc03395c381b8d829052f9775e69c38 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sat, 6 Mar 2010 22:15:50 +0100 Subject: [PATCH] Dumb implementation of missing PlSubIterator::first(). Signed-off-by: Florent Bruneau --- classes/pliteratorutils.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/classes/pliteratorutils.php b/classes/pliteratorutils.php index eff6eda..46e0802 100644 --- a/classes/pliteratorutils.php +++ b/classes/pliteratorutils.php @@ -438,6 +438,11 @@ class PlSubIterator implements PlIterator return ($this->source->last() && $this->next == null); } + public function first() + { + return $this->source->first(); + } + // Called by a subiterator to "rewind" the core iterator public function setNext($item) { @@ -518,6 +523,11 @@ class PlInnerSubIterator implements PlIterator return $this->over; } + public function first() + { + return false; + } + } // Wrapper class for 'arrayValueCallback' (get field $key of the given array) -- 2.1.4