Heratio Framework API Reference

QubitPager
in package
implements Countable, IteratorAggregate

Table of Contents

Interfaces

Countable
IteratorAggregate

Methods

__construct()  : mixed
count()  : int
Countable interface — returns total number of results.
getCriteria()  : Criteria|null
Get the Criteria.
getFirstIndice()  : int
Get the first indice (1-indexed position of first item on page).
getFirstPage()  : int
Get first page number.
getIterator()  : ArrayIterator
IteratorAggregate interface — iterate over current page results.
getLastIndice()  : int
Get the last indice (1-indexed position of last item on page).
getLastPage()  : int
Get last page number.
getLinks()  : array<string|int, mixed>
Get page links for pagination UI.
getMaxPerPage()  : int
Get max results per page.
getNbPages()  : int
Get total number of pages.
getNbResults()  : int
Get total number of results.
getNextPage()  : int
Get next page number.
getPage()  : int
Get current page number.
getPreviousPage()  : int
Get previous page number.
getResults()  : array<string|int, mixed>
Get paginated results, hydrated as model instances.
haveToPaginate()  : bool
Check if pagination is needed.
init()  : void
Initialize the pager (run count query).
isFirstPage()  : bool
Check if we're on the first page.
isLastPage()  : bool
Check if we're on the last page.
setCriteria()  : void
Set the Criteria for this pager.
setMaxPerPage()  : void
Set max results per page.
setPage()  : void
Set current page number (1-indexed).

Methods

__construct()

public __construct(string $class) : mixed
Parameters
$class : string

The Qubit model class name (e.g. 'QubitPhysicalObject')

count()

Countable interface — returns total number of results.

public count() : int
Return values
int

getFirstIndice()

Get the first indice (1-indexed position of first item on page).

public getFirstIndice() : int
Return values
int

getFirstPage()

Get first page number.

public getFirstPage() : int
Return values
int

getIterator()

IteratorAggregate interface — iterate over current page results.

public getIterator() : ArrayIterator
Return values
ArrayIterator

getLastIndice()

Get the last indice (1-indexed position of last item on page).

public getLastIndice() : int
Return values
int

getLastPage()

Get last page number.

public getLastPage() : int
Return values
int

Get page links for pagination UI.

public getLinks([int $nbLinks = 5 ]) : array<string|int, mixed>

Returns an array of page numbers to display.

Parameters
$nbLinks : int = 5

Number of page links to show

Return values
array<string|int, mixed>

getMaxPerPage()

Get max results per page.

public getMaxPerPage() : int
Return values
int

getNbPages()

Get total number of pages.

public getNbPages() : int
Return values
int

getNbResults()

Get total number of results.

public getNbResults() : int
Return values
int

getNextPage()

Get next page number.

public getNextPage() : int
Return values
int

getPage()

Get current page number.

public getPage() : int
Return values
int

getPreviousPage()

Get previous page number.

public getPreviousPage() : int
Return values
int

getResults()

Get paginated results, hydrated as model instances.

public getResults() : array<string|int, mixed>
Return values
array<string|int, mixed>

haveToPaginate()

Check if pagination is needed.

public haveToPaginate() : bool
Return values
bool

init()

Initialize the pager (run count query).

public init() : void

Propel pagers require init() before use. Here we run the count query to determine total results.

isFirstPage()

Check if we're on the first page.

public isFirstPage() : bool
Return values
bool

isLastPage()

Check if we're on the last page.

public isLastPage() : bool
Return values
bool

setMaxPerPage()

Set max results per page.

public setMaxPerPage(int $max) : void
Parameters
$max : int

setPage()

Set current page number (1-indexed).

public setPage(int $page) : void
Parameters
$page : int

        
On this page

Search results