From: Florent Bruneau Date: Sat, 6 Mar 2010 21:15:50 +0000 (+0100) Subject: Dumb implementation of missing PlSubIterator::first(). X-Git-Tag: core/1.1.0~61 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=9d865d031dc03395c381b8d829052f9775e69c38;p=platal.git Dumb implementation of missing PlSubIterator::first(). Signed-off-by: Florent Bruneau --- 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)