\CGBetterUploadsDownloadSet

A placeholder type that represents a set of download objects.

Created frm a filter object and an array... this is a countable and iterable list of download objects. It also supports pagination.

Summary

Methods
Properties
Constants
pageList()
__construct()
$pagecount
$page
$total
$filter
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$pagecount

$pagecount : integer

The total number of pages

Type

integer

$page

$page : integer

The current page number

Type

integer

$total

$total : integer

The total number of records matched by the filter.

Type

integer

$filter

$filter : \CGBetterUploads\Filter

The filter used to create the matches.

Type

\CGBetterUploads\Filter

Methods

pageList()

pageList(integer  $surround = 5) : array<mixed,integer>

Get a list of pages matching this resultset, to be used in generating a pagination interface.

Parameters

integer $surround

The number of entries to surround the current page with.

Returns

array<mixed,integer> —

An array of page numbers.

__construct()

__construct(\CGBetterUploads\DownloadFilter  $filter, integer  $totalMatches, array  $matches = null) 

Constructor

Parameters

\CGBetterUploads\DownloadFilter $filter

The filter used to load the matches

integer $totalMatches

the total number of downloads that match the filter.

array $matches

The matches loaded from the database. May be <= $totalmatches