
Public Member Functions | |
| __construct (spunQ_SelectQuery $query=NULL, $itemsPerPage=NULL, $currentPage=NULL) | |
| Constructor. | |
| getPageContents () | |
| Returns the results to show on the current page. | |
| getAmountPages () | |
| Returns the total number of pages. | |
| getAmountObjects () | |
| Returns the total number of objects the query would return. | |
| setAmountObjects ($amount) | |
| Sets the total number of objects the query would return. | |
| getQueryParameters () | |
| setQueryParameters ($queryParameters) | |
| getObjects () | |
| Returns the objects in the pager. | |
| getItemsPerPage () | |
| getCurrentPage () | |
| setCurrentPage ($currentPage) | |
| Setter needed to set currentPage. | |
| show ($entryPoint, $entryPointParameters, $pageParameter= 'page', $proximity=3, $template= 'spunQ.querypager.default') | |
| showAjax ($entryPoint, $entryPointParameters, $divToUpdate, $ajaxPostValues= '', $pageParameter= 'page', $proximity=3, $template= 'spunQ.querypager.ajax') | |
Protected Attributes | |
| $query | |
| The query we're paging. | |
| $db = 'default' | |
| Database to run query on. | |
| $queryParameters = array() | |
| $objects | |
| The objects we're paging. | |
| $itemsPerPage | |
| Number of items per page. | |
| $currentPage = 1 | |
| The page we're currently displaying. | |
| $amountPages = NULL | |
| Caches getAmountPages(). | |
| $amountObjects = NULL | |
| Caches getAmountObjects(). | |
Definition at line 6 of file QueryPager.class.php.
| spunQ_QueryPager::__construct | ( | spunQ_SelectQuery $ | query = NULL, |
|
| $ | itemsPerPage = NULL, |
|||
| $ | currentPage = NULL | |||
| ) |
Constructor.
| $query | The query we're paging. | |
| $itemsPerPage | Number of items to show per page. | |
| $currentPage | Current page number. |
Definition at line 31 of file QueryPager.class.php.
| spunQ_QueryPager::getAmountObjects | ( | ) |
Returns the total number of objects the query would return.
Definition at line 64 of file QueryPager.class.php.
| spunQ_QueryPager::getAmountPages | ( | ) |
Returns the total number of pages.
Definition at line 52 of file QueryPager.class.php.
| spunQ_ObjectPager::getObjects | ( | ) | [inherited] |
Returns the objects in the pager.
Definition at line 52 of file ObjectPager.class.php.
| spunQ_QueryPager::getPageContents | ( | ) |
Returns the results to show on the current page.
Definition at line 42 of file QueryPager.class.php.
| spunQ_QueryPager::setAmountObjects | ( | $ | amount | ) |
Sets the total number of objects the query would return.
This is an optimization, the function does not need to be called at all. But if the number is available, it can be passed to this function to make one less query.
| amount | integer |
Definition at line 79 of file QueryPager.class.php.
| spunQ_ObjectPager::setCurrentPage | ( | $ | currentPage | ) | [inherited] |
Setter needed to set currentPage.
when check if Page still exists after deletion fails
Definition at line 94 of file ObjectPager.class.php.
spunQ_ObjectPager::$amountObjects = NULL [protected, inherited] |
spunQ_ObjectPager::$amountPages = NULL [protected, inherited] |
spunQ_ObjectPager::$currentPage = 1 [protected, inherited] |
The page we're currently displaying.
Definition at line 21 of file ObjectPager.class.php.
spunQ_QueryPager::$db = 'default' [protected] |
spunQ_ObjectPager::$itemsPerPage [protected, inherited] |
spunQ_ObjectPager::$objects [protected, inherited] |
The objects we're paging.
Definition at line 9 of file ObjectPager.class.php.
spunQ_QueryPager::$query [protected] |
The query we're paging.
Definition at line 12 of file QueryPager.class.php.
1.5.9