Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/*
3
 *  $Id: Offset.php 7490 2010-03-29 19:53:27Z jwage $
4
 *
5
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
6
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
8
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
9
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
12
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
13
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
15
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16
 *
17
 * This software consists of voluntary contributions made by many individuals
18
 * and is licensed under the LGPL. For more information, see
19
 * <http://www.doctrine-project.org>.
20
 */
21
 
22
/**
23
 * Doctrine_Collection_Offset
24
 * Collection of Doctrine_Record objects.
25
 *
26
 * @package     Doctrine
27
 * @subpackage  Collection
28
 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
29
 * @link        www.doctrine-project.org
30
 * @since       1.0
31
 * @version     $Revision: 7490 $
32
 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi>
33
 */
34
class Doctrine_Collection_Offset extends Doctrine_Collection
35
{
36
    /**
37
     * @var integer $limit
38
     */
39
    private $limit;
40
 
41
    /**
42
     * @param Doctrine_Table $table
43
     */
44
    public function __construct(Doctrine_Table $table)
45
    {
46
        parent::__construct($table);
47
        $this->limit = $table->getAttribute(Doctrine_Core::ATTR_COLL_LIMIT);
48
    }
49
 
50
    /**
51
     * @return integer
52
     */
53
    public function getLimit()
54
    {
55
        return $this->limit;
56
    }
57
 
58
    /**
59
     * @return Doctrine_Collection_Iterator_Expandable
60
     */
61
    public function getIterator()
62
    {
63
        return new Doctrine_Collection_Iterator_Expandable($this);
64
    }
65
}