承接 stagerightlabs/phpxdr 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stagerightlabs/phpxdr

Composer 安装命令:

composer require stagerightlabs/phpxdr

包简介

Encode and Decode XDR strings with PHP

README 文档

README

Read and Write XDR with PHP

Latest Version on Packagist Total Downloads GitHub Actions

This package provides an implementation of the RFC 4506 External Data Representation standard for PHP. It is built to be extensible; you can encode and decode custom data objects as well as primitive generics.

This package is currently in beta; the API is still subject to change.

Important Note: Quadruple-Precision Floating-Point numbers are not supported by this package as a native type. However tools are provided for you to implement this in your own project should you have the need.

Installation

You can install the package via composer:

composer require stagerightlabs/phpxdr

Usage

use StageRightLabs\PhpXdr\XDR;

// Encode
$xdr = XDR::fresh()
    ->write(42, XDR::INT)
    ->write(3.14, XDR::FLOAT)
    ->write('Bad Wolf', XDR::STRING);

$payload = $xdr->asBase64(); // AAAAKkBI9cMAAAAIQmFkIFdvbGY=

// Decode
$xdr = XDR::fromBase64('AAAAKkBI9cMAAAAIQmFkIFdvbGY=');
$int = $xdr->read(XDR::INT); // 42
$float = $xdr->read(XDR::FLOAT); // ~3.14
$string = $xdr->read(XDR::STRING); // 'Bad Wolf'

More implementation and usage details can be found in the wiki.

Testing

./vendor/bin/phpunit

Credits

This package draws a lot of inspiration from both zulucrypto/stellar-api and stellar/js-xdr.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email ryan@stagerightlabs.com instead of using the issue tracker.

License

The Apache License 2. Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate by Beyond Code.

统计信息

  • 总下载量: 5.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2021-11-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固