Fully Qualified Name: | Laminas\Paginator\Paginator |
Implements: | Countable, IteratorAggregate |
Name | Description | Defined By |
---|---|---|
__construct() | Constructor. | Paginator |
__toString() | Serializes the object as a string. Proxies to {@link render()}. | Paginator |
clearPageItemCache() | Clear the page item cache. | Paginator |
count() | Returns the number of pages. | Paginator |
getAbsoluteItemNumber() | Returns the absolute item number for the specified item. | Paginator |
getAdapter() | Returns the adapter. | Paginator |
getCurrentItemCount() | Returns the number of items for the current page. | Paginator |
getCurrentItems() | Returns the items for the current page. | Paginator |
getCurrentPageNumber() | Returns the current page number. | Paginator |
getDefaultItemCountPerPage() | Get the default item count per page | Paginator |
getDefaultScrollingStyle() | Returns the default scrolling style. | Paginator |
getFilter() | Get the filter | Paginator |
getItem() | Returns an item from a page. The current page is used if there's no page specified. | Paginator |
getItemCount() | Returns the number of items in a collection. | Paginator |
getItemCountPerPage() | Returns the number of items per page. | Paginator |
getItemsByPage() | Returns the items for a given page. | Paginator |
getIterator() | Returns a foreach-compatible iterator. | Paginator |
getPageItemCache() | Returns the page item cache. | Paginator |
getPageRange() | Returns the page range (see property declaration above). | Paginator |
getPages() | Returns the page collection. | Paginator |
getPagesInRange() | Returns a subset of pages within a given range. | Paginator |
getScrollingStylePluginManager() | Returns the scrolling style manager. If it doesn't exist it's created. | Paginator |
getTotalItemCount() | Returns the total number of items available. | Paginator |
getView() | Retrieves the view instance. | Paginator |
normalizeItemNumber() | Brings the item number in range of the page. | Paginator |
normalizePageNumber() | Brings the page number in range of the paginator. | Paginator |
render() | Renders the paginator. | Paginator |
setCache() | Sets a cache object | Paginator |
setCacheEnabled() | Enables/Disables the cache for this instance | Paginator |
setCurrentPageNumber() | Sets the current page number. | Paginator |
setDefaultItemCountPerPage() | Set the default item count per page | Paginator |
setDefaultScrollingStyle() | Sets the default scrolling style. | Paginator |
setFilter() | Set a filter chain | Paginator |
setGlobalConfig() | Set a global config | Paginator |
setItemCountPerPage() | Sets the number of items per page. | Paginator |
setPageRange() | Sets the page range (see property declaration above). | Paginator |
setScrollingStylePluginManager() | Paginator | |
setView() | Sets the view object. | Paginator |
toJson() | Returns the items of the current page as JSON. | Paginator |
Constructor.
Parameter Name | Type | Description |
---|---|---|
$adapter | \AdapterInterface|\AdapterAggregateInterface |
Returns:
Serializes the object as a string. Proxies to {@link render()}.
Returns: string
Clear the page item cache.
Parameter Name | Type | Description |
---|---|---|
$pageNumber | int |
Returns: \Paginator
Returns the number of pages.
Returns: int
Returns the absolute item number for the specified item.
Parameter Name | Type | Description |
---|---|---|
$relativeItemNumber | int | Relative |
$pageNumber | int | Page |
Returns: int
Returns the adapter.
Returns: \AdapterInterface
Returns the number of items for the current page.
Returns: int
Returns the items for the current page.
Returns: \Traversable
Returns the current page number.
Returns: int
Get the default item count per page
Returns: int
Returns the default scrolling style.
Returns: string
Get the filter
Returns: \FilterInterface
Returns an item from a page. The current page is used if there's no page specified.
Parameter Name | Type | Description |
---|---|---|
$itemNumber | int | Item |
$pageNumber | int |
Returns: mixed
Returns the number of items in a collection.
Parameter Name | Type | Description |
---|---|---|
$items | mixed | Items |
Returns: int
Returns the number of items per page.
Returns: int
Returns the items for a given page.
Parameter Name | Type | Description |
---|---|---|
$pageNumber | int |
Returns: mixed
Returns a foreach-compatible iterator.
Returns: \Traversable
Returns the page item cache.
Returns: array
Returns the page range (see property declaration above).
Returns: int
Returns the page collection.
Parameter Name | Type | Description |
---|---|---|
$scrollingStyle | string | Scrolling |
Returns: \stdClass
Returns a subset of pages within a given range.
Parameter Name | Type | Description |
---|---|---|
$lowerBound | int | Lower |
$upperBound | int | Upper |
Returns: array
Returns the scrolling style manager. If it doesn't exist it's created.
Returns: \ScrollingStylePluginManager
Returns the total number of items available.
Returns: int
Retrieves the view instance.
If none registered, instantiates a PhpRenderer instance.
Returns: \Laminas\View\Renderer\RendererInterface|null
Brings the item number in range of the page.
Parameter Name | Type | Description |
---|---|---|
$itemNumber | int |
Returns: int
Brings the page number in range of the paginator.
Parameter Name | Type | Description |
---|---|---|
$pageNumber | int |
Returns: int
Renders the paginator.
Parameter Name | Type | Description |
---|---|---|
$view | \Laminas\View\Renderer\RendererInterface |
Returns: string
Sets a cache object
Parameter Name | Type | Description |
---|---|---|
$cache | \CacheStorage |
Returns:
Enables/Disables the cache for this instance
Parameter Name | Type | Description |
---|---|---|
$enable | bool |
Returns: \Paginator
Sets the current page number.
Parameter Name | Type | Description |
---|---|---|
$pageNumber | int | Page |
Returns: \Paginator $this
Set the default item count per page
Parameter Name | Type | Description |
---|---|---|
$count | int |
Returns:
Sets the default scrolling style.
Parameter Name | Type | Description |
---|---|---|
$scrollingStyle | string |
Returns:
Set a filter chain
Parameter Name | Type | Description |
---|---|---|
$filter | \FilterInterface |
Returns: \Paginator
Set a global config
Parameter Name | Type | Description |
---|---|---|
$config | array|\Traversable |
Returns:
Sets the number of items per page.
Parameter Name | Type | Description |
---|---|---|
$itemCountPerPage | int |
Returns: \Paginator $this
Sets the page range (see property declaration above).
Parameter Name | Type | Description |
---|---|---|
$pageRange | int |
Returns: \Paginator $this
Parameter Name | Type | Description |
---|---|---|
$scrollingAdapters |
Returns: void
Sets the view object.
Parameter Name | Type | Description |
---|---|---|
$view | \Laminas\View\Renderer\RendererInterface |
Returns: \Paginator
Returns the items of the current page as JSON.
Returns: string