Class Message
Abstract message (base class for Request and Response)
This class represents a general HTTP message. It provides common properties and methods for the HTTP request and response, as defined in the PSR-7 MessageInterface.
- Slim\Http\Message implements Psr\Http\Message\MessageInterface
Direct known subclasses
Abstract
Namespace: Slim\Http
See:
See:
Link: https://github.com/php-fig/http-message/blob/master/src/MessageInterface.php
Located at Http/Message.php
Namespace: Slim\Http
See:
Slim\Http\RequestSee:
Slim\Http\ResponseLink: https://github.com/php-fig/http-message/blob/master/src/MessageInterface.php
Located at Http/Message.php
Methods summary
public
|
|
public
string
|
|
public
static
|
#
withProtocolVersion( string $version )
Return an instance with the specified HTTP protocol version. |
public
array
|
|
public
boolean
|
|
public
string[]
|
|
public
string
|
#
getHeaderLine( string $name )
Retrieves a comma-separated string of the values for a single header. |
public
static
|
#
withHeader( string $name, string|string[] $value )
Return an instance with the provided value replacing the specified header. |
public
static
|
#
withAddedHeader( string $name, string|string[] $value )
Return an instance with the specified header appended with the given value. |
public
static
|
|
public
Psr\Http\Message\StreamInterface
|
|
public
static
|
Properties summary
protected
string
|
$protocolVersion
Protocol version |
#
'1.1'
|
protected static
array
|
$validProtocolVersions
A map of valid protocol versions |
#
[
'1.0' => true,
'1.1' => true,
'2.0' => true,
]
|
protected
|
$headers
Headers |
|
protected
Psr\Http\Message\StreamInterface
|
$body
Body object |