bankiru/jsonrpc-server-bundle
最新稳定版本:1.1.3
Composer 安装命令:
composer require bankiru/jsonrpc-server-bundle
包简介
JSON-RPC server symfony bundle
README 文档
README
JSON-RPC Server bundle
This bundle provides JSON-RPC 2.0 server ontop of the bankiru/rpc-server-bundle library.
Serialization
This bundle uses rpc.view event in order to serialize response if request
was instance of JsonRpcRequestInterface and the response is not a
JsonRpcResponseInterface object. You can bypass the serialization process
with sending pre-created response object or implementing your own view listener
Context
This library utilizes JMS Serializer Bundle
to automatically serialize non-JSON-RPC controller response to serialized view.
You can specify the serialization context at the routing level. Also you
could disable default context usage with with_default_context: false
Exception handling
Any unhandled exception from the controller would be automatically
converted to the proper JSON-RPC failure response with INTERNAL_ERROR (-32603) code.
If you want do display other error you could extend JsonRpcException class or
configure it manually like following:
$exception = new JsonRpcException(); $execption->setJsonRpcError( new JsonRpcError( JsonRpcError::METHOD_NOT_FOUND, 'Invalid method', (object)['debug_data' => 'some debug data'] ) );
Specification
Refer to official JSON-RPC 2.0 specification at http://www.jsonrpc.org/specification
bankiru/jsonrpc-server-bundle 适用场景与选型建议
bankiru/jsonrpc-server-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.99k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 04 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bankiru/jsonrpc-server-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bankiru/jsonrpc-server-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16.99k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-18