phpsoftbox / telegram-mongo
MongoDB storage adapter for PhpSoftBox Telegram
dev-master
2026-03-05 11:42 UTC
Requires
- php: ^8.4
- ext-mongodb: *
- mongodb/mongodb: ^1.16 || ^2.0
- phpsoftbox/telegram: dev-master
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.93
- phpsoftbox/cli-app: dev-master
- phpsoftbox/cs-fixer: ^1.1.0
- phpunit/phpunit: ^11.2
This package is auto-updated.
Last update: 2026-03-05 11:42:21 UTC
README
About
phpsoftbox/telegram-mongo — MongoDB-хранилище для диалогов Telegram.
Quick Start
use MongoDB\Client; use PhpSoftBox\Telegram\Storage\Mongo\MongoConversationStore; $client = new Client('mongodb://localhost:27017'); $collection = $client->selectCollection('app', 'telegram_conversations'); $store = new MongoConversationStore($collection);
Индексы
use PhpSoftBox\Telegram\Storage\Mongo\MongoConversationIndexManager; $indexes = new MongoConversationIndexManager($collection); $indexes->ensureIndexes(ttlSeconds: 3600);