From e750f3ee194a44eed580be2a961b70b398618d7a Mon Sep 17 00:00:00 2001 From: doctrine Date: Tue, 30 May 2006 09:00:09 +0000 Subject: [PATCH] Added a folder remotely --- Doctrine/Iterator/Expandable.php | 25 +++++++++++++++++++++++++ Doctrine/Iterator/Normal.php | 12 ++++++++++++ Doctrine/Iterator/Offset.php | 8 ++++++++ 3 files changed, 45 insertions(+) create mode 100644 Doctrine/Iterator/Expandable.php create mode 100644 Doctrine/Iterator/Normal.php create mode 100644 Doctrine/Iterator/Offset.php 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 @@ +