Offset.php 723 Bytes
Newer Older
doctrine's avatar
doctrine committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<?php
Doctrine::autoload('Doctrine_Collection');
/**
 * Offset Collection
 */
class Doctrine_Collection_Offset extends Doctrine_Collection {
    /**
     * @var integer $limit
     */
    private $limit;
    /**
     * @param Doctrine_Table $table
     */
    public function __construct(Doctrine_Table $table) {
        parent::__construct($table);
        $this->limit = $table->getAttribute(Doctrine::ATTR_COLL_LIMIT);
    }
    /**
     * @return integer
     */
    public function getLimit() {
        return $this->limit;
    }
    /**
     * @return Doctrine_Iterator_Offset
     */
    public function getIterator() {
        return new Doctrine_Iterator_Expandable($this);
    }
}
31