crell/response-builder
最新稳定版本:0.3.2
Composer 安装命令:
composer require crell/response-builder
包简介
README 文档
README
This library is a loose collection of tools to make working with the PSR HTTP stack a bit easier.
Included tools
HttpStatus
Yet another Enum listing the different typical HTTP response codes used.
ResponseBuilder
ResponseBuilder is a simple convenience wrapper around the PSR-17 factory classes. It provides a single, easy to use "builder" class that produces common PSR-7 response objects types. You may bring your own PSR-17 factory of your choice.
See the ResponseBuilder class, as its methods should be fairly self-explantory just from their names.
CacheHeaderMiddleware
This zero-configuration middleware ensures that cache headers are stripped from requests/responses that should not have them, according to the HTTP spec.
EnforceHeadMiddleware
Ensures that the response to a HEAD request has an empty body, even if one was incorrectly set.
DefaultContentTypeMiddleware
Allows setting a default content-type and accept header value on incoming requests. Useful for APIs that allow clients to not specify those headers, without code further on needing to account for it being missing.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.
Credits
License
The Lesser GPL version 3 or later. Please see License File for more information.
crell/response-builder 适用场景与选型建议
crell/response-builder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 42 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 05 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 crell/response-builder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 crell/response-builder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 42
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2025-05-13