Bitrix API

Paginator

Class Paginator

To be removed soon. Don't use it.

Table of Contents

Methods

calculateQueryLimits()  : array<string|int, mixed>
Returns two element array with offset and limit based on paging parameters.
query()  : Result
Makes offset and limit calculations and executes limited query against $connection.

Methods

calculateQueryLimits()

Returns two element array with offset and limit based on paging parameters.

public static calculateQueryLimits(int $numberOfRecords, int $pageNumber, int $numberOfRecordsPerPage, bool $backward) : array<string|int, mixed>
Parameters
$numberOfRecords : int

Total number of records returned by Sql query.

$pageNumber : int

Page to be displayed.

$numberOfRecordsPerPage : int

Page size.

$backward : bool

Use backward paging.

Return values
array<string|int, mixed>

query()

Makes offset and limit calculations and executes limited query against $connection.

public static query(string $sql, Connection $connection, int $numberOfRecords, int $pageNumber, int $numberOfRecordsPerPage[, bool $backward = false ]) : Result
Parameters
$sql : string

Sql query.

$connection : Connection

Database connection for query execution.

$numberOfRecords : int

Total number of records returned by Sql query.

$pageNumber : int

Page to be displayed.

$numberOfRecordsPerPage : int

Page size.

$backward : bool = false

Use backward paging.

Tags
throws
SqlQueryException
Return values
Result

        
On this page

Search results