thisismzm / php-ext-tdlib

PHP extension for interfacing with TdLib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TdLib PHP Extension

A PHP extension to integrate TdLib via JSON interface

Requirements

  • PHP 7.0+

Installation

phpize
./configure
make
make install

Add the following line to your php.ini

extension=tdlib.so

To try out the extension, you can run the following command

php -a -d extension=modules/tdlib.so

Reference

<?php

class TdLib
{
    /**
     * Synchronously executes TDLib request.
     * Only a few requests can be executed synchronously.
     *
     * @param array|\JsonSerializable $request
     *
     * @return array
     */
    public static function execute($request): array
    {
    }

    /**
     * Receives incoming updates and request responses from the TDLib client.
     *
     * @param float $timeout The maximum number of seconds allowed for this function to wait for new data.
     *
     * @return array
     */
    public function receive(float $timeout): array
    {
    }

    /**
     * Sends request to the TDLib client.
     *
     * @param array|\JsonSerializable $request
     */
    public function send($request): void
    {
    }
}

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

Please see License File for more information.

About

PHP extension for interfacing with TdLib

License:MIT License


Languages

Language:C 70.4%Language:M4 16.0%Language:CMake 7.0%Language:PHP 6.6%