TYPO3CMS
9.5
Main Page
Related Pages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
$
d
e
r
u
Functions
Variables
$
e
r
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
HtmlResponse.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Core\Http
;
3
4
/*
5
* This file is part of the TYPO3 CMS project.
6
*
7
* It is free software; you can redistribute it and/or modify it under
8
* the terms of the GNU General Public License, either version 2
9
* of the License, or any later version.
10
*
11
* For the full copyright and license information, please read the
12
* LICENSE.txt file that was distributed with this source code.
13
*
14
* The TYPO3 project - inspiring people to share!
15
*/
16
24
class
HtmlResponse
extends
Response
25
{
33
public
function
__construct
($content, $status = 200, array
$headers
= [])
34
{
35
$body
=
new
Stream
(
'php://temp'
,
'wb+'
);
36
$body
->write($content);
37
$body
->rewind();
38
parent::__construct(
$body
, $status,
$headers
);
39
40
// Ensure that text/html header is set, if Content-Type was not set before
41
if
(!$this->
hasHeader
(
'Content-Type'
)) {
42
$this->headers[
'Content-Type'
][] =
'text/html; charset=utf-8'
;
43
$this->lowercasedHeaderNames[
'content-type'
] =
'Content-Type'
;
44
}
45
}
46
}
TYPO3\CMS\Core\Http\Message\hasHeader
bool hasHeader($name)
Definition:
Message.php:122
TYPO3\CMS\Core\Http\HtmlResponse\__construct
__construct($content, $status=200, array $headers=[])
Definition:
HtmlResponse.php:33
TYPO3\CMS\Core\Http\Response
Definition:
Response.php:28
TYPO3\CMS\Core\Http\Stream
Definition:
Stream.php:28
TYPO3\CMS\Core\Http\Message\$body
StreamInterface $body
Definition:
Message.php:50
TYPO3\CMS\Core\Http\Message\$headers
array $headers
Definition:
Message.php:39
TYPO3\CMS\Core\Http\HtmlResponse
Definition:
HtmlResponse.php:25
TYPO3\CMS\Core\Http
Definition:
AbstractApplication.php:3
doxygen
typo3
sysext
core
Classes
Http
HtmlResponse.php
Generated on Tue Oct 5 2021 01:57:08 for TYPO3CMS by
1.8.18