layas/ffi-tdlib

PHP FFI 通过 JSON 接口与 TdLib 集成

v1.0.3 2022-09-13 07:12 UTC

This package is auto-updated.

Last update: 2024-09-13 11:44:31 UTC


README

Latest Version on Packagist Software License Build Status Total Downloads

Email

PHP FFI 通过 JSON 接口与 TdLib 集成

安装

通过 Composer

$ composer require aurimasniekis/ffi-tdlib

参考

<?php

namespace AurimasNiekis\FFI;

class TdLib
{
    /**
     * @param string|null $libFile An optional file path/name to `libtdjson.so` library
     */
    public function __construct(string $libFile = null)
    {
    }

    /**
     * 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
    {
    }
}

测试

运行测试用例

运行 PHP 风格检查器

$ composer cs-check

运行 PHP 风格修复器

$ composer cs-fix

运行所有持续集成测试

$ composer ci-run

贡献

请参阅 CONTRIBUTINGCONDUCT 以获取详细信息。

许可证

有关更多信息,请参阅 许可证文件