定制 10up/http 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

10up/http

最新稳定版本:1.0.0

Composer 安装命令:

composer require 10up/http

包简介

HTTP Header wrapper.

README 文档

README

HTTP Header wrapper.

Purpose

The objective of this library is to provide a test-ready alternative to PHP's default header() interface. Instead of sending headers directly, you can add them to PHP using this library. Additionally, you can easily mock this library in your own projects to fully decouple code from PHP primitives.

Installation

This module can be easily installed by adding 10up/http to your composer.json file. Then, either autoload your Composer dependencies or manually include() the HTTP.php bootstrap file.

Use

Rather than invoking PHP's header() method directly, simply call \TenUp\HTTP\v1_0_0\add() to add new headers. This allows you to specify a key, a value, and flag whether or not to overwrite existing values.

All headers loaded into the system will be sent to the browser when WordPress invokes it's usual send_headers action; there is no other work you need to do on your own.

Changelog

1.0

  • First public release

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-30