Download the PHP package radianceteam/ton-client-php without Composer
On this page you can find all versions of the php package radianceteam/ton-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download radianceteam/ton-client-php
More information about radianceteam/ton-client-php
Files in radianceteam/ton-client-php
Package ton-client-php
Short Description TON Client Wrapper for PHP
License Apache-2.0
Informations about the package ton-client-php
# TON Client Wrapper for PHP
Community links:
True async wrapper powered by ton_client extension with multi-threading and blocking queues under the hood.
Requirements
- PHP version 7.4+ or 8.0+.
- Composer (https://getcomposer.org/)
Installation
- Install TON Client PHP extension as described in readme.
- Run
composer
:
Usage examples
Basic example
Configuration & Logging
Handling async events
Each module interface has async()
function which returns asynchronous interface version. Note that some functions,
like in processing module, have async versions only.
Subscribing to events
Async interface also allows processing events occurred between function start and finish. This can be achieved via
calling getEvents()
function of the returned promise. Note this blocks the current program flow until the new event
fired, or the unsubscribe function called.
Other
See more examples in demo folder.
Docker images
All Docker images are based on alpine
image. They contain the corresponding PHP interpreter from
the original PHP image
with ton-client extension preinstalled.
How to use Docker images
Use radianceteam/ton-client-php
as a base image in your Dockerfile
:
Basically, do anything you can do with the original PHP image
by just replacing FROM php:<PHP_VERSION>-<PHP_IMAGE_VARIANT>
with
FROM radianceteam/ton-client-php:1.38.0-php<PHP_VERSION>-<PHP_IMAGE_VARIANT>
.
Note: only cli
, fpm
and zts
variants are supported ATM.
TODO
Add apache
variant based on Debian Buster image, as in the original PHP repo.
Development
See Development notes.
License
Apache License, Version 2.0.
Troubleshooting
Fire any question to our Telegram channel.