承接 phly/phly-restfully 相关项目开发

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

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

phly/phly-restfully

最新稳定版本:2.3.1

Composer 安装命令:

composer require phly/phly-restfully

包简介

ZF2 Module providing structure for RESTful resources

README 文档

README

ABANDONED

As of the 2.3.0 release, I have marked this module as abandoned.

The module very quickly proved that the approach was worthwhile and useful, and became the seed for Apigility. That project has far surpassed its origins in this module, and added a ton of functionality this module never managed to create, such as content negotiation, file upload handling, entity and collection hydration, and more.

As such, I recommend using Apigility in favor of PhlyRestfully for new projects, and that existing projects migrate to Apigility when possible.

This module provides structure and code for quickly implementing RESTful APIs that use JSON as a transport.

It allows you to create RESTful JSON APIs that use the following standards:

  • HAL, used for creating hypermedia links
  • Problem API, used for reporting API problems

Documentation is available at rtfd.org.

Upgrading

If you were using version 1.0.0 or earlier (the version presented at PHP Benelux 2013), you will need to make some changes to your application to get it to work.

  • First, the terminology has changed, as have some class names, to reference "resources" instead of "items"; this is more in line with RESTful terminology.
    • As such, if you had any code using PhlyRestfully\HalItem, it should now reference PhlyRestfully\HalResource. Similarly, in that class, you will access the actual resource object now from the resource property instead of the item property. (This should only affect those post-1.0.0).
    • If you want to create link for an individual resource, use the forResource method of HalLinks, and not the forItem method.
    • InvalidItemException was renamed to InvalidResourceException.
  • A number of items were moved from the RestfulJsonModel to the RestfulJsonRenderer.
    • Hydrators
    • The flag for displaying exception backtraces; in fact, you can use the view_manager.display_exceptions configuration setting to set this behavior.
  • All results from the ResourceController are now pushed to a payload variable in the view model.
    • Additionally, ApiProblem, HalResource, and HalCollection are first-class objects, and are used as the payload values.
  • The Links plugin was renamed to HalLinks, and is now also available as a view helper.

LICENSE

This module is licensed using the BSD 2-Clause License:

Copyright (c) 2013, Matthew Weier O'Phinney
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

phly/phly-restfully 适用场景与选型建议

phly/phly-restfully 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.09k 次下载、GitHub Stars 达 110, 最近一次更新时间为 2013 年 01 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「rest」 「zend」 「zf2」 「module」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 phly/phly-restfully 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 phly/phly-restfully 我们能提供哪些服务?
定制开发 / 二次开发

基于 phly/phly-restfully 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 110
  • Watchers: 25
  • Forks: 44
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2013-01-10