X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fpliteratorutils.php;fp=classes%2Fpliteratorutils.php;h=46e0802e44e7c254d507017a03986b12ec50c44d;hb=9d865d031dc03395c381b8d829052f9775e69c38;hp=eff6edaa6b06832e3ccf154f72611f630b23559f;hpb=e677bc13379b7ad58b161411ce35ba4a13bc54d3;p=platal.git 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)