This is automatic generated document for things in Swow\Psr7\Message\AbstractMessage class
Class AbstractMessage
Properties
protected $body protected $headerNames headers names holder format like [ 'x-header' => 'X-Header' ]
protected $headers headers holder format like [ 'X-Header' => [ 'value 1', 'value 2' ] ]
protected $protocolVersion protected $shouldKeepAlive Methods
public function addHeader ( string $name , (string | array<string> | null) $value ) : static Method getBody
public function getBody ( ) : StreamInterface Method getContentLength
public function getContentLength ( ) : int Method getContentType
public function getContentType ( ) : string public function getHeader ( mixed $name ) : array public function getHeaderLine ( mixed $name ) : string 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>> Returns array<string, array<string>>
$headers
public function hasHeader ( mixed $name ) : bool Method setBody
public function setBody ( mixed $body ) : static Notice MUST clone the object before you change the body’s content
public function setHeader ( string $name , (string | array<string> | null) $value ) : static header will be unset when value is NULL, since headerValue must be an array, we can’t use NULL to mean that this header should not been sent.
public function setHeaders ( array<string, (array<string> | string)> $headers ) : static Method setHeadersAndHeaderNames
public function setHeadersAndHeaderNames ( array<string, (array<string> | string)> $headers , array<string, string> $headerNames ) : static Method setProtocolVersion
public function setProtocolVersion ( string $protocolVersion ) : static Method setShouldKeepAlive
public function setShouldKeepAlive ( bool $shouldKeepAlive ) : static Method shouldKeepAlive
public function shouldKeepAlive ( ) : bool Method toString
public function toString ( bool $withoutBody ) : string public function unsetHeader ( string $name ) : static public function withAddedHeader ( string $name , (string | string[]) $value ) : static Method withBody
public function withBody ( StreamInterface $body ) : static public function withHeader ( string $name , (string | string[]) $value ) : static public function withHeaders ( array<string, (array<string> | string)> $headers ) : static Method withProtocolVersion
public function withProtocolVersion ( mixed $version ) : static public function withoutHeader ( string $name ) : static