\Pages

Pages class

Cuts and offsets the content

Summary

Methods
Properties
Constants
__construct()
getCurrentRules()
get()
No public properties found
SYSTEM_MAX
SYSTEM_MIN
No protected methods found
No protected properties found
N/A
RegID()
parseRules()
applyRules()
prepareRules()
getRules()
$id_register
$parsed
$id
$data
$default_params
$default_params_user
$p
$limits
N/A

Constants

SYSTEM_MAX

SYSTEM_MAX = 500

Max global count

SYSTEM_MIN

SYSTEM_MIN = 1

Min global count

Properties

$id_register

$id_register : array<mixed,mixed>

Type

array<mixed,mixed> — All IDs

$parsed

$parsed : array<mixed,mixed>

Type

array<mixed,mixed> — All got rules

$id

$id : integer

Type

integer — Pages element ID

$data

$data : array<mixed,mixed>

Type

array<mixed,mixed> — Data for pagination

$default_params

$default_params : array<mixed,mixed>

Type

array<mixed,mixed> — Default settings

$default_params_user

$default_params_user : array<mixed,mixed>

Type

array<mixed,mixed> — User's universal defaults

$p

$p : array<mixed,mixed>

Type

array<mixed,mixed> — Settings for the object *

$limits

$limits : array<mixed,integer>

Type

array<mixed,integer> — Limits for the Pages

Methods

__construct()

__construct(mixed  $data, mixed  $id, mixed  $limits = array(), mixed  $default = array()) : void

__construct

Creates Pages object

The Pages object is used to give via API big arrays by parts

Parameters

mixed $data

The array to display

mixed $id

ID to control the object (could be not just unique)

mixed $limits

Count limits [min, max]

mixed $default

Default rules [offset, count, page, jumpAllowed]. You can fall back to default values using "_" string or by not adding them if they are at the end.

Throws

\apiException

[104] Wrong rules, critical parse errors

getCurrentRules()

getCurrentRules() : void

Public function to get all rules that are already in use

get()

get() : void

Gets the data using rules

RegID()

RegID(mixed  $id) : void

RegID

Parameters

mixed $id

Control ID to register

parseRules()

parseRules(mixed  $rules) : void

Parse Rules

Checks and autofills given rules

Parameters

mixed $rules

The rules to work with

applyRules()

applyRules(mixed  $rules) : void

Just saves the rules

Parameters

mixed $rules

Rules to save

prepareRules()

prepareRules() : void

Gets users By-ID Control data from request

getRules()

getRules() : void

Searches for parsed rules for current id or returns fallback config ("_"s)