room11/http 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

room11/http

最新稳定版本:0.2.1

Composer 安装命令:

composer require room11/http

包简介

A set of interfaces and standard implementations to allow sweet sweet interoperability.

README 文档

README

A small set of interfaces to allow people to re-use libaries across projects.

The interfaces

  • Request

  • Response

  • Body

Guide for creating Body implementations

Contrary to standard coding practices, it is preferable for implementations of the body interface that all the work that is done in the constructor. This allows any problems to be detected before the response starts to be sent, and so avoid any possible confusion about which headers have been sent.

For example, the FileBody implementation opens the file to be sent in the constructor and holds the FileHandle open until the FileBody is sent. This ensures that any errors in opening the file occur inside the application code, rather than the framework code.

Similarly the JsonBody does the json_encode'ing inside the constructor, so that any exception are, again, reported inside the application code creating the JsonBody, rather than in the framework code when it sends the JsonBody.

Install git pre-commit hook

Please install the git pre-commit in the ./test/git_hooks directory to have the code style checks done before committing. Although they will get picked up by the CI tool, it is a courtesy to other developers to avoid committing broken stuff.

统计信息

  • 总下载量: 930
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-24