‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Http\HtmlResponse Class Reference
Inheritance diagram for TYPO3\CMS\Core\Http\HtmlResponse:
TYPO3\CMS\Core\Http\Response TYPO3\CMS\Core\Http\Message

Public Member Functions

 __construct (string $content, int $status=200, array $headers=[])
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Http\Response
 __construct ($body='php://temp', int $statusCode=200, array $headers=[], string $reasonPhrase='')
 
int getStatusCode ()
 
string getReasonPhrase ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Http\Message
string getProtocolVersion ()
 
array getHeaders ()
 
bool hasHeader (string $name)
 
string[] getHeader (string $name)
 
string getHeaderLine (string $name)
 
StreamInterface getBody ()
 
 filter (string $value)
 
 validateHeaderName (string $name)
 
 isValidHeaderValue (string $value)
 

Additional Inherited Members

- ‪Static Public Member Functions inherited from ‪TYPO3\CMS\Core\Http\Response
static withStatus (int $code, string $reasonPhrase='')
 
- ‪Static Public Member Functions inherited from ‪TYPO3\CMS\Core\Http\Message
static withProtocolVersion (string $version)
 
static withHeader (string $name, $value)
 
static withAddedHeader (string $name, $value)
 
static withoutHeader (string $name)
 
static withBody (StreamInterface $body)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Http\Message
 assertHeaders (array $headers)
 
array filterHeaders (array $originalHeaders)
 
 arrayContainsOnlyStrings (array $data)
 
 validateHeaderValues (array $values)
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Http\Response
int $statusCode
 
string $reasonPhrase = ''
 
array $availableStatusCodes
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Http\Message
string $protocolVersion = '1.1'
 
array $headers = []
 
array $lowercasedHeaderNames = []
 
StreamInterface $body = null
 

Detailed Description

A default HTML response object

Highly inspired by ZF zend-diactoros

Note that this is not public API yet.

Definition at line 27 of file HtmlResponse.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Http\HtmlResponse::__construct ( string  $content,
int  $status = 200,
array  $headers = [] 
)

Creates a HTML response object with a default 200 response code

Parameters
string$content‪HTML content written to the response
int$status‪status code for the response; defaults to 200.
array$headers‪Additional headers to be set.

Definition at line 36 of file HtmlResponse.php.

References TYPO3\CMS\Core\Http\Message\$body, TYPO3\CMS\Core\Http\Message\$headers, and TYPO3\CMS\Core\Http\Message\hasHeader().