Skip to main content Link Menu Expand (external link) Document Search Copy Copied

This is automatic generated document for things in Swow\Psr7\Message\MessagePlusInterface class

Interface MessagePlusInterface

Constants

public DEFAULT_PROTOCOL_VERSION = "1.1"

Methods

Method addHeader

public function addHeader ( string $name , mixed $value ) : static

Method getBody

public function getBody ( ) : StreamInterface

Method getHeader

public function getHeader ( mixed $name ) : string[]

Returns string[] $headers

Method getHeaderLine

public function getHeaderLine ( mixed $name ) : string

Method getHeaders

public function getHeaders ( ) : array<string, array<string>>

Returns array<string, array<string>> $headers

Method getProtocolVersion

public function getProtocolVersion ( ) : string

Method getStandardHeaders

public function getStandardHeaders ( ) : array<string, array<string>>

TODO: consider whether it’s needed

Method hasHeader

public function hasHeader ( mixed $name ) : bool

Method setBody

public function setBody ( StreamInterface $body ) : static

Method setHeader

public function setHeader ( string $name , mixed $value ) : static

Method setHeaders

public function setHeaders ( array<string, (array<string> | string)> $headers ) : static

Method setProtocolVersion

public function setProtocolVersion ( string $version ) : static

Method shouldKeepAlive

public function shouldKeepAlive ( ) : bool

Method toString

public function toString ( bool $withoutBody ) : string

Method unsetHeader

public function unsetHeader ( string $name ) : static

Method withAddedHeader

public function withAddedHeader ( mixed $name , mixed $value ) : static

Method withBody

public function withBody ( StreamInterface $body ) : static

Method withHeader

public function withHeader ( mixed $name , mixed $value ) : static

Method withHeaders

public function withHeaders ( array<string, (array<string> | string)> $headers ) : static

Method withProtocolVersion

public function withProtocolVersion ( mixed $version ) : static

Method withoutHeader

public function withoutHeader ( mixed $name ) : static

Copyright 2022 the Swow contributors