PHPackages                             s0d3s/tg-long-req - 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. s0d3s/tg-long-req

ActiveLibrary

s0d3s/tg-long-req
=================

Simple PHP class for navigate user in telegram bot(by design)

1.0.8(6y ago)2864MITPHPPHP &gt;=5.3.0

Since Sep 27Pushed 6y agoCompare

[ Source](https://github.com/s0d3s/tg-long-req)[ Packagist](https://packagist.org/packages/s0d3s/tg-long-req)[ Docs](https://github.com/irazasyed/telegram-bot-sdk)[ RSS](/packages/s0d3s-tg-long-req/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

TG LONG REQUEST
===============

[](#tg-long-request)

What is this?
-------------

[](#what-is-this)

This is a small help-oriented class for creating tg bots. It helps with the creation and navigation in the menu telegram bot

---

Это небольшой класс для телеграм ботов. Он помогает в создании меню и дальнейшей навигации в нём.

Abstract exemple
----------------

[](#abstract-exemple)

[![](https://camo.githubusercontent.com/7673920572a025fde5103501e70827aab9c76126749ee6e6c228629d49758972/687474703a2f2f672e7265636f726469742e636f2f72716f6e464f645234742e676966)](https://camo.githubusercontent.com/7673920572a025fde5103501e70827aab9c76126749ee6e6c228629d49758972/687474703a2f2f672e7265636f726469742e636f2f72716f6e464f645234742e676966)

INSTALL
-------

[](#install)

**via composer**

(add this to section "require" in your composer.json)

```
{
  "require" : {
	"s0d3s/tg-long-req": ">=1"
  }
}

```

and

```
include_once('path/to/autoload.php');
use s0d3s\TgLongReq;

```

**manual**

Copy the "TgLongReq.php" to the project dir and:

```
include_once('TgLongReq.php');
use s0d3s\TgLongReq;

```

Simple use
----------

[](#simple-use)

1. **Create a TgLongReq obj**

> $tg\_req = TgLongReq ( 'user\_id', 'req\_func list' */*optinal*/* , 'user\_request\_dir', tg\_api\_key, tg\_api\_result );

VarTypeCaption$user\_idSTRINGTelegram user id$req\_funcARRAYRequests and functions association table$usr\_req\_dirSTRPath to general request dir \*\*$tg\_api\_keySOMETH/\*irazasyed/telegram-bot-sdk Api() object\*$tg\_api\_resultSOMETH/\*Api()-&gt;getWebhookUpdates()\*It could be something else, or be null. \*\*Temporary requests from users will be stored in this folder.

---

2. **Create request**

> $tg\_req-&gt;reqCreate('req\_name'); \*

\*This parameter depends only on you (this name should be in the association table)

---

3. **Save and restore temprorary data**

- **saving**

For store (temporary) data, you can use "saveToTemp", the function accepts any data types and saves it as json string

> $tg\_req-&gt;saveToTemp($some\_data);

- **restore**

.

> $some\_array = array(); $some\_array = $tg\_req-&gt;getFromTemp($hold\_it==false);\*

\* If needed, you can leave a temporary file until the next used, for this pass to function "true"(bool)

---

4. **Check the existence of the request**

> $tg\_req-&gt;reqCheck(); //return true if exists, else false

---

5. **Delete user request**

> $tg\_req-&gt;reqDel();

---

6. **Handling request**

> $tg\_req-&gt;reqHand(); //This method will call the corresponding function from the association table.

---

7. **NOTES**

- Association table is array('req\_name'=&gt;'func\_name')
- Functions specified in the table may not process passed parameters

> Some examples you can find at ./exmp

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2416d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c9062ebe255e470646c8f91bceb4785c411dc25bccb49647daa363b86964e64?d=identicon)[SoDeS](/maintainers/SoDeS)

---

Top Contributors

[![s0d3s](https://avatars.githubusercontent.com/u/49758901?v=4)](https://github.com/s0d3s "s0d3s (47 commits)")

---

Tags

phptelegramtelegram-bottelegram-botstelegram-long-requesttelegram-menutelegram-user-interfaceteleram-bot-menurequesttelegramtelegram bottelegram bot menu

### Embed Badge

![Health badge](/badges/s0d3s-tg-long-req/health.svg)

```
[![Health](https://phpackages.com/badges/s0d3s-tg-long-req/health.svg)](https://phpackages.com/packages/s0d3s-tg-long-req)
```

###  Alternatives

[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[telegram-bot-sdk/telegram-bot-sdk

The Telegram Bot API PHP SDK

32480.5k](/packages/telegram-bot-sdk-telegram-bot-sdk)[tg-bot-api/bot-api-base

Clear and simple Telegram bot API

22278.8k2](/packages/tg-bot-api-bot-api-base)[klev-o/telegram-bot-api

Simple and convenient object-oriented implementation Telegram bot API with php version ^7.4 support. You'll like it)

457.8k1](/packages/klev-o-telegram-bot-api)[luzrain/telegram-bot-bundle

Symfony bundle for Telegram Bot API

1228.1k](/packages/luzrain-telegram-bot-bundle)[luzrain/telegram-bot-api

PHP Wrapper for Telegram Bot API

1032.8k1](/packages/luzrain-telegram-bot-api)

PHPackages © 2026

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