aurimasniekis/ffi-tdlib

通过 JSON 接口与 TdLib 集成的 PHP FFI

1.0.0 2020-04-04 11:21 UTC

This package is auto-updated.

Last update: 2024-09-04 20:49:55 UTC


README

Latest Version on Packagist Software License Build Status Total Downloads

Email

通过 JSON 接口与 TdLib 集成的 PHP FFI

安装

通过 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 以获取详细信息。

许可证

请参阅 许可证文件 获取更多信息。