This commit is contained in:
parent
efc6d71d33
commit
bd90246432
@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
Doctrine::autoload('Doctrine_Iterator');
|
|
||||||
|
|
||||||
class Doctrine_Iterator_Expandable extends Doctrine_Iterator {
|
|
||||||
public function valid() {
|
|
||||||
if($this->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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
* This software consists of voluntary contributions made by many individuals
|
|
||||||
* and is licensed under the LGPL. For more information, see
|
|
||||||
* <http://www.phpdoctrine.com>.
|
|
||||||
*/
|
|
||||||
Doctrine::autoload('Doctrine_Iterator');
|
|
||||||
|
|
||||||
class Doctrine_Iterator_Normal extends Doctrine_Iterator {
|
|
||||||
/**
|
|
||||||
* @return boolean whether or not the iteration will continue
|
|
||||||
*/
|
|
||||||
public function valid() {
|
|
||||||
return ($this->index < $this->count);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
Doctrine::autoload('Doctrine_Iterator');
|
|
||||||
|
|
||||||
class Doctrine_Iterator_Offset extends Doctrine_Iterator {
|
|
||||||
public function valid() { }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user