cornford/bencoded
Composer 安装命令:
composer require cornford/bencoded
包简介
An easy way to use bencoding in Laravel.
README 文档
README
For Laravel 5.x, check version 2.0.0
For Laravel 4.x, check version 1.0.0
Think of Bencoded as an easy way to use bencoding with Laravel. These include:
Bencoded::encodeBencoded::decode
Installation
Begin by installing this package through Composer. Edit your project's composer.json file to require cornford/bencoded.
"require": {
"cornford/bencoded": "2.*"
}
Next, update Composer from the Terminal:
composer update
Once this operation completes, the next step is to add the service provider. Open app/config/app.php, and add a new item to the providers array.
'Cornford\Bencoded\Providers\BencodedServiceProvider',
The final step is to introduce the facade. Open app/config/app.php, and add a new item to the aliases array.
'Bencoded' => 'Cornford\Bencoded\Facades\BencodedFacade',
That's it! You're all set to go.
Usage
It's really as simple as using the Bencoded class in any Controller / Model / File you see fit with:
Bencoded::
This will give you access to
Encode
The encode method encodes an item into a bencoding format.
Bencoded::encode([['name' => 'tom'], ['name' => 'jerry']]);
Decode
The decode method decodes a bencoding string into PHP types.
Bencoded::decode('ld4:name3:tomed4:name5:jerryee);
License
Bencoded is open-sourced software licensed under the MIT license
cornford/bencoded 适用场景与选型建议
cornford/bencoded 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 507 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 01 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「bencode」 「encode」 「decode」 「laravel」 「bencoding」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cornford/bencoded 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cornford/bencoded 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cornford/bencoded 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
AMWSCAN (Antimalware Scanner) is a php antimalware/antivirus scanner console script written in php for scan your project. This can work on php projects and a lot of others platform.
Encode integer IDs using a preset or customized symbol set
Runn Me! Serialization Library
PHP Library for decoding and encoding BitTorrent BEncoded data
Composer version of torrent-rw https://github.com/adriengibrat/torrent-rw
With the JSON codec you will be able to encode into and decode from JSON data in an object oriented way. It wraps PHP's functions `json_encode()` and `json_decode()`.
统计信息
- 总下载量: 507
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-30