|
Doctrine 1.2.4
|
Public Member Functions | |
| __construct ($query, $page, $maxPerPage=0) | |
| execute ($params=array(), $hydrationMode=null) | |
| getCountQuery () | |
| getCountQueryParams ($defaultParams=array()) | |
| getExecuted () | |
| getFirstIndice () | |
| getFirstPage () | |
| getLastIndice () | |
| getLastPage () | |
| getMaxPerPage () | |
| getNextPage () | |
| getNumResults () | |
| getPage () | |
| getPreviousPage () | |
| getQuery () | |
| getRange ($rangeStyle, $options=array()) | |
| getResultsInPage () | |
| haveToPaginate () | |
| setCountQuery ($query, $params=null) | |
| setCountQueryParams ($params=array(), $append=false) | |
| setMaxPerPage ($max) | |
| setPage ($page) | |
Protected Member Functions | |
| _adjustOffset () | |
| _initialize ($params=array()) | |
| _setExecuted ($executed) | |
| _setLastPage ($page) | |
| _setNumResults ($nb) | |
| _setPage ($page) | |
| _setQuery ($query) | |
| Doctrine_Pager::__construct | ( | $query, | |
| $page, | |||
$maxPerPage = 0 |
|||
| ) |
__construct
| mixed | $query | Accepts either a Doctrine_Query object or a string (which does the Doctrine_Query class creation). |
| int | $page | Current page |
| int | $maxPerPage | Maximum itens per page |
Definition at line 86 of file Pager.php.
|
protected |
_adjustOffset
Adjusts last page of Doctrine_Pager, offset and limit of Doctrine_Query associated
Definition at line 123 of file Pager.php.
|
protected |
_initialize
Initialize Pager object calculating number of results
| $params | Optional parameters to Doctrine_Query::execute |
Definition at line 104 of file Pager.php.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
_setQuery
Defines the collector query to be used by pager
| Doctrine_Query | Accepts either a Doctrine_Query object or a string (which does the Doctrine_Query class creation). |
Definition at line 449 of file Pager.php.
| Doctrine_Pager::execute | ( | $params = array(), |
|
$hydrationMode = null |
|||
| ) |
execute
Executes the query, populates the collection and then return it
| $params | Optional parameters to Doctrine_Query::execute |
| $hydrationMode | Hydration Mode of Doctrine_Query::execute returned ResultSet. |
Definition at line 542 of file Pager.php.
| Doctrine_Pager::getCountQuery | ( | ) |
getCountQuery
Returns the Doctrine_Query object that is used to make the count results to pager
Definition at line 466 of file Pager.php.
| Doctrine_Pager::getCountQueryParams | ( | $defaultParams = array() | ) |
getCountQueryParams
Returns the params to be used by counter Doctrine_Query
Definition at line 503 of file Pager.php.
| Doctrine_Pager::getExecuted | ( | ) |
| Doctrine_Pager::getFirstIndice | ( | ) |
getFirstIndice
Return the first indice number for the current page
| Doctrine_Pager::getFirstPage | ( | ) |
| Doctrine_Pager::getLastIndice | ( | ) |
getLastIndice
Return the last indice number for the current page
| Doctrine_Pager::getLastPage | ( | ) |
getLastPage
Returns the last page (total of pages)
Definition at line 229 of file Pager.php.
| Doctrine_Pager::getMaxPerPage | ( | ) |
| Doctrine_Pager::getNextPage | ( | ) |
getNextPage
Returns the next page
Definition at line 276 of file Pager.php.
| Doctrine_Pager::getNumResults | ( | ) |
getNumResults
Returns the number of results found
Definition at line 186 of file Pager.php.
| Doctrine_Pager::getPage | ( | ) |
| Doctrine_Pager::getPreviousPage | ( | ) |
getPreviousPage
Returns the previous page
Definition at line 294 of file Pager.php.
| Doctrine_Pager::getQuery | ( | ) |
getQuery
Returns the Doctrine_Query collector object related to the pager
Definition at line 435 of file Pager.php.
| Doctrine_Pager::getRange | ( | $rangeStyle, | |
$options = array() |
|||
| ) |
getRange
Builds and return a Doctrine_Pager_Range_* based on arguments
| string | $rangeStyle | Pager Range style |
| array | $options | Custom subclass implementation options. Default is a blank array |
Definition at line 172 of file Pager.php.
| Doctrine_Pager::getResultsInPage | ( | ) |
getResultsInPage
Returns the number of itens in current page
Definition at line 415 of file Pager.php.
| Doctrine_Pager::haveToPaginate | ( | ) |
haveToPaginate
Return true if it's necessary to paginate or false if not
Definition at line 336 of file Pager.php.
| Doctrine_Pager::setCountQuery | ( | $query, | |
$params = null |
|||
| ) |
setCountQuery
Defines the counter query to be used by pager
| Doctrine_Query | Accepts either a Doctrine_Query object or a string (which does the Doctrine_Query class creation). |
| array | Optional params to be used by counter Doctrine_Query. If not defined, the params passed to execute method will be used. |
Definition at line 482 of file Pager.php.
| Doctrine_Pager::setCountQueryParams | ( | $params = array(), |
|
$append = false |
|||
| ) |
setCountQueryParams
Defines the params to be used by counter Doctrine_Query
| array | Optional params to be used by counter Doctrine_Query. If not defined, the params passed to execute method will be used. |
| boolean | Optional argument that append the query param instead of overriding the existent ones. |
Definition at line 518 of file Pager.php.
| Doctrine_Pager::setMaxPerPage | ( | $max | ) |
setMaxPerPage
Defines the maximum number of itens per page and automatically adjust offset and limits
| $max | maximum number of itens per page |
Definition at line 395 of file Pager.php.
| Doctrine_Pager::setPage | ( | $page | ) |
setPage
Defines the current page and automatically adjust offset and limits
| $page | current page |