class PropelModelPager implements IteratorAggregate, Countable
Implements a pager based on a ModelCriteria The code from this class heavily borrows from symfony's sfPager class
Methods
| __construct(ModelCriteria $query, $maxPerPage = 10) | ||
| setQuery(ModelCriteria $query) | ||
| getQuery() | ||
| init($con = null) | ||
| PropelCollection | 
                    getResults()
                     Get the collection of results in the page  | 
                |
| getCurrentMaxLink() | ||
| getMaxRecordLimit() | ||
| setMaxRecordLimit($limit) | ||
| getLinks($nb_links = 5) | ||
| boolean | 
                    haveToPaginate()
                     Test whether the number of results exceeds the max number of results per page  | 
                |
| int | 
                    getFirstIndex()
                     Get the index of the first element in the page Returns 1 on the first page, $maxPerPage +1 on the second page, etc  | 
                |
| int | 
                    getLastIndex()
                     Get the index of the last element in the page Always less than or eaqual to $maxPerPage  | 
                |
| int | 
                    getNbResults()
                     Get the total number of results of the query This can be greater than $maxPerPage  | 
                |
| boolean | 
                    isFirstPage()
                     Check whether the current page is the first page  | 
                |
| int | 
                    getFirstPage()
                     Get the number of the first page  | 
                |
| boolean | 
                    isLastPage()
                     Check whether the current page is the last page  | 
                |
| int | 
                    getLastPage()
                     Get the number of the last page  | 
                |
| int | 
                    getPage()
                     Get the number of the current page  | 
                |
| 
                    setPage(int $page)
                     Set the number of the current page  | 
                ||
| int | 
                    getNextPage()
                     Get the number of the next page  | 
                |
| int | 
                    getPreviousPage()
                     Get the number of the previous page  | 
                |
| int | 
                    getMaxPerPage()
                     Get the maximum number results per page  | 
                |
| 
                    setMaxPerPage(int $max)
                     Set the maximum number results per page  | 
                ||
| boolean | 
                    isFirst()
                     Check whether the internal pointer is at the beginning of the list  | 
                |
| boolean | 
                    isLast()
                     Check whether the internal pointer is at the end of the list  | 
                |
| boolean | 
                    isEmpty()
                     Check if the collection is empty  | 
                |
| boolean | 
                    isOdd()
                     Check if the current index is an odd integer  | 
                |
| boolean | 
                    isEven()
                     Check if the current index is an even integer  | 
                |
| getIterator() | ||
| int | 
                    count()
                     Returns the total number of results.  | 
                
Details
        at line 37
                    public            
    __construct(ModelCriteria $query, $maxPerPage = 10)
    
    
        at line 43
                    public            
    setQuery(ModelCriteria $query)
    
    
        at line 48
                    public            
    getQuery()
    
    
        at line 53
                    public            
    init($con = null)
    
    
        at line 97
                    public            PropelCollection
    getResults()
    
    Get the collection of results in the page
        at line 107
                    public            
    getCurrentMaxLink()
    
    
        at line 112
                    public            
    getMaxRecordLimit()
    
    
        at line 117
                    public            
    setMaxRecordLimit($limit)
    
    
        at line 122
                    public            
    getLinks($nb_links = 5)
    
    
        at line 145
                    public            boolean
    haveToPaginate()
    
    Test whether the number of results exceeds the max number of results per page
        at line 156
                    public            int
    getFirstIndex()
    
    Get the index of the first element in the page Returns 1 on the first page, $maxPerPage +1 on the second page, etc
        at line 171
                    public            int
    getLastIndex()
    
    Get the index of the last element in the page Always less than or eaqual to $maxPerPage
        at line 190
                    public            int
    getNbResults()
    
    Get the total number of results of the query This can be greater than $maxPerPage
        at line 210
                    public            boolean
    isFirstPage()
    
    Check whether the current page is the first page
        at line 220
                    public            int
    getFirstPage()
    
    Get the number of the first page
        at line 230
                    public            boolean
    isLastPage()
    
    Check whether the current page is the last page
        at line 240
                    public            int
    getLastPage()
    
    Get the number of the last page
        at line 263
                    public            int
    getPage()
    
    Get the number of the current page
        at line 273
                    public            
    setPage(int $page)
    
    Set the number of the current page
        at line 287
                    public            int
    getNextPage()
    
    Get the number of the next page
        at line 297
                    public            int
    getPreviousPage()
    
    Get the number of the previous page
        at line 307
                    public            int
    getMaxPerPage()
    
    Get the maximum number results per page
        at line 317
                    public            
    setMaxPerPage(int $max)
    
    Set the maximum number results per page
        at line 341
                    public            boolean
    isFirst()
    
    Check whether the internal pointer is at the beginning of the list
        at line 352
                    public            boolean
    isLast()
    
    Check whether the internal pointer is at the end of the list
        at line 363
                    public            boolean
    isEmpty()
    
    Check if the collection is empty
        at line 374
                    public            boolean
    isOdd()
    
    Check if the current index is an odd integer
        at line 385
                    public            boolean
    isEven()
    
    Check if the current index is an even integer
        at line 390
                    public            
    getIterator()
    
    
        at line 401
                    public            int
    count()
    
    Returns the total number of results.