diff --git a/Doctrine/Iterator/Expandable.php b/Doctrine/Iterator/Expandable.php new file mode 100644 index 000000000..7a56b3d4a --- /dev/null +++ b/Doctrine/Iterator/Expandable.php @@ -0,0 +1,25 @@ +index < $this->count) + return true; + elseif($this->index == $this->count) { + + $coll = $this->collection->expand($this->index); + + if($coll instanceof Doctrine_Collection) { + $count = count($coll); + if($count > 0) { + $this->keys = array_merge($this->keys, $coll->getKeys()); + $this->count += $count; + return true; + } + } + + return false; + } + } +} +?> diff --git a/Doctrine/Iterator/Normal.php b/Doctrine/Iterator/Normal.php new file mode 100644 index 000000000..9e0b42733 --- /dev/null +++ b/Doctrine/Iterator/Normal.php @@ -0,0 +1,12 @@ +index < $this->count); + } +} +?> diff --git a/Doctrine/Iterator/Offset.php b/Doctrine/Iterator/Offset.php new file mode 100644 index 000000000..360860e92 --- /dev/null +++ b/Doctrine/Iterator/Offset.php @@ -0,0 +1,8 @@ +