PHPackages                             monstrikus/infinity\_scroll\_php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. monstrikus/infinity\_scroll\_php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

monstrikus/infinity\_scroll\_php
================================

Large Object Transmission Control Protocol

02611[1 PRs](https://github.com/monstrikus/infinity-scroll/pulls)PHP

Since Nov 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/monstrikus/infinity-scroll)[ Packagist](https://packagist.org/packages/monstrikus/infinity_scroll_php)[ RSS](/packages/monstrikus-infinity-scroll-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Large Object Transmission Control Protocol
==========================================

[](#large-object-transmission-control-protocol)

Abstract
--------

[](#abstract)

Large Object Transmission Control Protocol (LOTCP) is a language-independent, synchronized communication format between client and server.

This document establishes a common standard for interoperability between applications and is the primary guide to interoperability (Functional compatibility).

Status of This Memo
-------------------

[](#status-of-this-memo)

This document defines the LOTCP tracking protocol.

The development of this document is subject to the development of the following standards:

- RFC 7159 (JSON)

Distribution of this memo is limited (Only for internal use).

Copyright Notice
----------------

[](#copyright-notice)

MIT License

Copyright (c) 2023 Aleksei Vlasov, Vlad Saliy.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Table of Contents
-----------------

[](#table-of-contents)

1. [Introduction](#1-introduction)1.1 [Requirements](#1-1-requirements)1.2 [Terminology](#1-2-terminology)1.3 [Overall Operation](#1-3-overall-operation)
2. [Naming Convention and Type Naming Convention](#2-naming-convention-and-type-naming-convention)2.1 [Naming Convention](#2-1-naming-convention)2.2 [Type Naming Convention](#2-2-type-naming-convention)
3. [Protocol Parameters](#3-protocol-parameters)3.1 [Request](#3-1-request)3.2 [Response](#3-2-response)3.3 [Filter](#3-3-filter)3.4 [Page](#3-4-page)3.5 [Header](#3-5-header)3.6 [Meta](#3-6-meta)3.7 [Select](#3-7-select)3.8 [Synchronization](#3-8-synchronization)

### 1. Introduction

[](#1-introduction)

#### 1.1 Requirements

[](#11-requirements)

The key words **"MUST"**, **"MUST NOT"**, **"REQUIRED"**, **"SHALL"**, **"SHALL NOT"**, **"SHOULD"**, **"SHOULD NOT"**, **"RECOMMENDED"**, **"MAY"**, and **"OPTIONAL"** in this document are to be interpreted as described in **RFC 2119**.

An implementation is not compliant if it fails to satisfy one or more of the **MUST** or **REQUIRED** level requirements for the protocols it implements. An implementation that satisfies all the **MUST** or **REQUIRED** level and all the **SHOULD** level requirements for its protocols is said to be "unconditionally compliant"; one that satisfies all the MUST level requirements but not all the **SHOULD** level requirements for its protocols is said to be "conditionally compliant."

#### 1.2 Terminology

[](#12-terminology)

- Request - Attempt to get data from the server.
- Response - Get data from the server.
- Client - A program that establishes connections for the purpose of sending requests.
- Server - An application program that serves requests by sending responses. Any given program can be both a client and a server.

#### 1.3 Overall Operation

[](#13-overall-operation)

The LOTCP protocol is a request/response protocol. The client sends a request to the server in the form of JSON via any communication channel. The server responds back to the client as a JSON with a label for synchronization.

The request is built on JSON with the necessary parameters defined in [Request](#3-1-request).

Server **MAY** ignore request parameters. The server **REQUIRED** send new request parameters. The client is **REQUIRED** to change the request parameters as required by the server.

The response is built on JSON with **REQUIRED** parameters defined in [Response](#3-2-response).

### 2. Naming Convention and Type Naming Convention

[](#2-naming-convention-and-type-naming-convention)

#### 2.1 Naming Convention

[](#21-naming-convention)

- payload - Transferred data.
- header - Additional parameters for data; Properties/Description of transmitted data.
- meta - Communication data for client and server synchronization.
- countItems - Quantity of elements.
- identifyKey - Name of the identification key.
- totalItems - How many elements are present on the server. How big the object is.
- page - Information about the page or information about which page you need to get.
- hasNext - Information that the object is not fully received.
- nextIdentify - Information about client and server synchronization.
- totalPages - Quantity of existing pages.
- currentPage - Current page.
- nextPage - Next page.
- prevPage - Previous page.
- to - Required number of elements.
- filter - Information about filtering object elements.
- select - Object processing. Building a map of the object.
- name - Name of the operation/function/object.
- value - Depends on the context. Value or related data.

#### 2.2 Type Naming Convention

[](#22-type-naming-convention)

#### boolean - Boolean - bool

[](#boolean---boolean---bool)

> true bytes: 01110100 01110010 01110101 01100101
> hex: 74 72 75 65

#### string - STRING - String

[](#string---string---string)

> ABC 123 bytes: 01000001 01000010 01000011 00100000 00110001 00110010 00110011 hex: 41 42 43 20 31 32 33

#### number - Integer - int

[](#number---integer---int)

> 1 bytes: 00110001 hex: 31

#### array - Array - Data collection.

[](#array---array---data-collection)

> ```
>   int[2] = {1, 2, 3}; // C++ or Java
>   [1,2,3]; // JavaScript or PHP
>
> ```

#### JSON | XML | BASE 64

[](#json--xml--base-64)

> JSON - RFC 8259. XML - RFC 5364. BASE 64 - RFC 4648.

### 3. Protocol Parameters

[](#3-protocol-parameters)

#### 3.1 Request

[](#31-request)

> If you need to get a configuration without data parameter \[to = -1\].

Parameters NamesDescriptionsidentifyKeyWhich field in the object should be used for identification.toRequired number of elements. \[to &gt;= -1\] \[0 == null\] \[max = 50\]filterObject of filter. [About of Filter](#3-3-filter)pageNumber of page. [About of Page](#3-4-page)nextIdentifyNotifies about the next elements pool.selectBuilding a map of the object. [About of Select](#3-7-select)```
// Request object
{
   "identifyKey": "uuid",
   "to": 25,
   "filter": [
      {
         "name": "SORT",
         "identifyKey": "date",
         "value": "ASC"
      },
      {
         "name": "BETWEEN",
         "identifyKey": "date",
         "value": "[\"1970-01-01\",\"1970-12-31\"]"
      }
   ],
   "page": 1,
   "nextIdentify": "Ub7AZUwxNu...",
   "select": ["uuid", "name", "date"]
}
```

#### 3.2 Response

[](#32-response)

Parameters NamesDescriptionspayloadTransferred data.headerDescription of transmitted data. [About of Header](#3-5-header)metaCommunication data for client and server synchronization. [About of Meta](#3-6-meta)```
// Response object
{
   "payload": [
      {"uuid": "Ub7AZUwxNu..."},
      {"uuid": "AZNuUb7AZU..."}
   ],
   "header": {
      "countItems": 2,
      "identifyKey": "uuid"
   },
   "meta": {
      "totalItems": 100,
      "page":{
         "totalPages": 4,
         "currentPage": 1,
         "nextPage": 2,
         "prevPage": 0
      },
      "hasNext": true,
      "nextIdentify": "NuUbUwxNu..."
   }
}
```

#### 3.3 Filter

[](#33-filter)

The filter is designed to filter data (sort). The server may ignore the filter due to its absence or due to incorrect data passed to the filter. The minimum list of filters. Their presence is mandatory.

Name of filterDescription or exampleSORTSorting data \[value = "ASC" or "DESC"\]LIKETo search for the specified template in the column. \[value=%text%\]FINDGet an object by identification key.WHEREINTo search for the specified match values in a list. \[value=\[1\]\]WHERENOTINTo search for the specified match values not in a list. \[value=\[1\]\]BETWEENTo search for a value between. \[value = {"from": "", "to": ""}\]LESSx &lt; valueOVERx &gt; valueEQUAL\_OR\_LESSx &lt;= valueEQUAL\_OR\_OVERx &gt;= valueBasic parameters for describing an object.

Parameters NamesDescriptionsnameName of the filter.identifyKeyName of the identification key for the filter.valueValue or related data.Example JSON

```
// Filter object
{
   "name": "SORT",
   "identifyKey": "date",
   "value": "ASC"
}
```

#### 3.4 Page

[](#34-page)

The page describes the logic of the behavior of pages (like a book page).

This object depends on the parameters of the \[to, page\] request [About of Request](#3-1-request). If these parameters are missing, then the current object is not in the server response.

Basic parameters for describing an object.

Parameters NamesDescriptionstotalPagesQuantity of existing pages.currentPageCurrent page.nextPageNext page.prevPagePrevious page.Example JSON

```
// Page object
{
   "totalPages": 4,
   "currentPage": 1,
   "nextPage": 2,
   "prevPage": 0
}
```

#### 3.5 Header

[](#35-header)

The header describes the data that came in the payload.

Basic parameters for describing an object.

Parameters NamesDescriptionscountItemsQuantity of elements in payload.identifyKeyName of the identification key. The client obeys this value.Example JSON

```
// Header object
{
   "countItems": 2,
   "identifyKey": "uuid"
}
```

#### 3.6 Meta

[](#36-meta)

The meta object is used for coordination or for communication between the client and the server. This object is necessary for the client to understand how to get another piece of information.

Basic parameters for describing an object.

Parameters NamesDescriptionstotalItemsHow many elements are present on the server.page[About of Page](#3-4-page)hasNextInformation that the object is not fully received.nextIdentifyInformation about client and server synchronization.Example JSON

```
// Meta object
{
   "totalItems": 100,
   "page":{
      "totalPages": 4,
      "currentPage": 1,
      "nextPage": 2,
      "prevPage": 0
   },
   "hasNext": true,
   "nextIdentify": "NuUbUwxNu..."
}
```

#### 3.7 Select

[](#37-select)

Select is used to process the object. With this object, you can specify which object the client expects.

Example JSON

```
// Select object
["uuid", "name", "date"]
```

#### 3.8 Synchronization

[](#38-synchronization)

This protocol supports synchronization between the client and the server. Synchronization occurs every clock cycle (request/response). For premature synchronization, the client can request a zero clock cycle. Using \[to = 0\] will not give a result. Since 0 will be perceived as a lack of configuration. To get the result, use \[to = -1\]

> If you need to get a configuration without data parameter \[to = -1\].

Example Request

```
// Request object
{
   "identifyKey": "",
   "to": -1
}
```

Example Response

```
// Response object
{
   "payload": [],
   "header": {
      "countItems": 0,
      "identifyKey": "uuid"
   },
   "meta": {
      "totalItems": 100,
      "hasNext": true,
      "nextIdentify": "NuUbUwxNu..."
   }
}
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab59bf48b8219eeac4fe90218c3a4e4c389ecb944f79a65dd341094d95713111?d=identicon)[monstrikus](/maintainers/monstrikus)

---

Top Contributors

[![monstrikus](https://avatars.githubusercontent.com/u/7884087?v=4)](https://github.com/monstrikus "monstrikus (1 commits)")[![saliyy](https://avatars.githubusercontent.com/u/68225663?v=4)](https://github.com/saliyy "saliyy (1 commits)")

### Embed Badge

![Health badge](/badges/monstrikus-infinity-scroll-php/health.svg)

```
[![Health](https://phpackages.com/badges/monstrikus-infinity-scroll-php/health.svg)](https://phpackages.com/packages/monstrikus-infinity-scroll-php)
```

###  Alternatives

[suarez/laravel-utm-parameter

A little helper to store and handle utm-parameter

1513.8k](/packages/suarez-laravel-utm-parameter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
