gtheron/rest-bundle
Composer 安装命令:
composer require gtheron/rest-bundle
包简介
A bundle based on FriendsOfSymfony/RestBundle. Gives a base pattern for Resource definition and manipulation, along with base Controllers and Services to avoid REST resource manipulation code redundancy.
关键字:
README 文档
README
This bundle depends on FOSRestBundle. In a word, it aims at providing a base for REST resource definition and CRUD manipulation.
What is this bundle?
If you're working on a REST api with Symfony2, you probably have used FOSRestBundle. It offers functionnality for controllers and automatic routing, which is remarkably handy for building any REST api.
However, after having used it for a relatively large api, with lots of entities - which in the REST vocabulary would be Resources - I still had a lot of boilerplate code, especially since almost all resources needed at least basic CRUD functions. This meant code repetition in Controllers, Services and Models.
This bundle aims to provide a base definition for exposed Resources, as well as a service that provides CRUD operations for all resources, and abstract controllers with boilerplate code for the most common functions (cget, get, post and put - delete being quite trivial to write generally).
Note that as the moment of writing, I basically just ported code. There are a few things I need to work on before it's quite ready for use:
| Feature | State |
|---|---|
| Making authorization checks optional | Written, being tested |
| Offering more/better events in the validation cycle | Written, being tested |
| Automatic event generation | Written, being tested |
| Recursive resources (sub resource atm) | In design phase |
Feel free to take a look at the code and provide suggestions!
Requirements
FOSRestBundle will be required with composer on install. However, at this time, the Symfony ACL system is required to be initialized and ready for use (this is temporary, as it will only be needed in the future if you use the security options of the bundle). Refer to this doc to install it: http://symfony.com/doc/current/cookbook/security/acl.html
gtheron/rest-bundle 适用场景与选型建议
gtheron/rest-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 09 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「rest」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 gtheron/rest-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 gtheron/rest-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 gtheron/rest-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
BlockCypher's PHP SDK for REST API
Helper classes for creating cookie headers
支付宝开放平台v3协议文档,支持最新版PHP8+
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-17