ytake/extended-hack-http-request

extended interface for HTTP messages

0.1.2 2020-05-03 04:46 UTC

This package is auto-updated.

Last update: 2021-03-31 06:54:12 UTC


README

Defines common cross-framework interfaces to represent HTTP requests and responses

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;
}