ytake/extended-hack-http-request

HTTP消息的扩展接口

资助包维护!
ytake

安装数: 6,184

依赖者: 1

建议者: 0

安全性: 0

星星: 0

关注者: 3

分支: 0

公开问题: 0

语言:Hack

0.1.2 2020-05-03 04:46 UTC

This package is auto-updated.

Last update: 2024-08-29 05:18:57 UTC


README

定义了常见的跨框架接口来表示HTTP请求和响应

namespace Ytake\Extended\HttpMessage;

use namespace Facebook\Experimental\Http\Message;

interface ServerRequestInterface extends Message\ServerRequestInterface {

  public function getAttributes(): dict<string, mixed>;

  public function getAttribute<T>(string $name, ?T $default = null): T;

  public function withAttribute(string $name, mixed $value): this;

  public function withoutAttribute(string $name): this;
}