Menu

## DefaultPaginator
in package

DefaultPaginator.php : 12

### Table of Contents

$baseUrl : string
$defaultPageLimit : int
$defaultPageNum : int
$modelUrlPath : string
$page : int
$paginator : Paginator
$query : QueryBuilder
$recordsPerPage : int
$totalRecords : int
$usesCursor : bool
__construct() : mixed
createMetaData() : array<string|int, mixed>
createResponse() : array<string|int, mixed>
getBaseRecordUrl() : string
getBaseUrl() : string
getModelUrlPath() : string
getPageLimitFromRequest() : int
getPageNumFromRequest() : int
getPaginator() : Paginator
getRecords() : array<string|int, mixed>
setBaseUrl() : void
setModelUrlPath() : void
setPaginator() : mixed

### Properties

#### $baseUrl

DefaultPaginator.php : 19
`protected string $baseUrl = 'https://localhost:8080'`

#### $defaultPageLimit

DefaultPaginator.php : 17
`protected static int $defaultPageLimit = 100`

#### $defaultPageNum

DefaultPaginator.php : 15
`protected static int $defaultPageNum = 1`

#### $modelUrlPath

DefaultPaginator.php : 21
`protected string $modelUrlPath = ''`

#### $page

DefaultPaginator.php : 25
`protected int $page`

#### $paginator

DefaultPaginator.php : 31
`protected Paginator $paginator`

#### $query

DefaultPaginator.php : 23
`protected QueryBuilder $query`

#### $recordsPerPage

DefaultPaginator.php : 27
`protected int $recordsPerPage`

#### $totalRecords

DefaultPaginator.php : 29
`protected int $totalRecords = 0`

#### $usesCursor

DefaultPaginator.php : 33
`protected bool $usesCursor = false`

### Methods

#### __construct()

DefaultPaginator.php : 92
`public __construct(QueryBuilder $query[, int $recordsPerPage = 100 ]) : mixed`

##### Parameters

$query : QueryBuilder
$recordsPerPage : int = 100

##### Return values

mixed —

#### createMetaData()

DefaultPaginator.php : 205
`public createMetaData() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### createResponse()

DefaultPaginator.php : 184
`public createResponse([bool $includeMetaData = true ]) : array<string|int, mixed>`

##### Parameters

$includeMetaData : bool = true

##### Return values

array<string|int, mixed> —

#### getBaseRecordUrl()

DefaultPaginator.php : 178
`public getBaseRecordUrl() : string`

##### Return values

string —

#### getBaseUrl()

DefaultPaginator.php : 149
`public getBaseUrl() : string`

##### Return values

string —

#### getModelUrlPath()

DefaultPaginator.php : 165
`public getModelUrlPath() : string`

##### Return values

string —

#### getPageLimitFromRequest()

DefaultPaginator.php : 64
`public static getPageLimitFromRequest(WebRequest $request) : int`

##### Parameters

$request : WebRequest

##### Return values

int —

#### getPageNumFromRequest()

DefaultPaginator.php : 35
`public static getPageNumFromRequest(WebRequest $request) : int`

##### Parameters

$request : WebRequest

##### Return values

int —

#### getPaginator()

DefaultPaginator.php : 140
`public getPaginator() : Paginator`

##### Return values

Paginator —

#### getRecords()

DefaultPaginator.php : 200
`public getRecords() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### setBaseUrl()

DefaultPaginator.php : 157
`public setBaseUrl(string $baseUrl) : void`

##### Parameters

$baseUrl : string

##### Return values

void —

#### setModelUrlPath()

DefaultPaginator.php : 173
`public setModelUrlPath(string $modelUrlPath) : void`

##### Parameters

$modelUrlPath : string

##### Return values

void —

#### setPaginator()

DefaultPaginator.php : 134
`public setPaginator() : mixed`

##### Return values

mixed —

## Search results