TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
Response Class Reference
Inheritance diagram for Response:
Response ResponseInterface

Public Member Functions

 injectEnvironmentService (\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService)
 
 setStatus ($code, $message=null)
 
 getStatus ()
 
 setHeader ($name, $value, $replaceExistingHeader=true)
 
 getHeaders ()
 
 sendHeaders ()
 
 send ()
 
 getAdditionalHeaderData ()
 
 setRequest (\TYPO3\CMS\Extbase\Mvc\Web\Request $request)
 
 getRequest ()
 
 shutdown ()
 
- Public Member Functions inherited from Response
 setContent ($content)
 
 appendContent ($content)
 
 getContent ()
 
 shutdown ()
 
 __toString ()
 

Protected Member Functions

 getTypoScriptFrontendController ()
 

Protected Attributes

 $headers = []
 
 $additionalHeaderData = []
 
 $statusCode
 
 $statusMessage = 'OK'
 
 $request
 
 $statusMessages
 
 $environmentService
 
- Protected Attributes inherited from Response
 $content = null
 

Detailed Description

A web specific response implementation

Definition at line 26 of file extbase/Classes/Mvc/Web/Response.php.

Member Function Documentation

getAdditionalHeaderData ( )

Returns the additional header data

Returns
array The additional header data

Definition at line 268 of file extbase/Classes/Mvc/Web/Response.php.

References Response\$additionalHeaderData.

Referenced by Response\shutdown().

getHeaders ( )

Returns the HTTP headers - including the status header - of this web response

Returns
string[] The HTTP headers

Definition at line 189 of file extbase/Classes/Mvc/Web/Response.php.

References Response\$statusMessage.

Referenced by Response\sendHeaders().

getRequest ( )
Returns

Definition at line 284 of file extbase/Classes/Mvc/Web/Response.php.

References Response\$request.

getStatus ( )

Returns status code and status message.

Returns
string The status code and status message, eg. "404 Not Found

Definition at line 156 of file extbase/Classes/Mvc/Web/Response.php.

References Response\$statusMessage.

getTypoScriptFrontendController ( )
protected
Returns
TypoScriptFrontendController

Definition at line 306 of file extbase/Classes/Mvc/Web/Response.php.

References $GLOBALS.

Referenced by Response\shutdown().

injectEnvironmentService ( \TYPO3\CMS\Extbase\Service\EnvironmentService  $environmentService)
Parameters
\TYPO3\CMS\Extbase\Service\EnvironmentService$environmentService

Definition at line 124 of file extbase/Classes/Mvc/Web/Response.php.

References Response\$environmentService.

send ( )

Renders and sends the whole web response

Returns
void

Definition at line 229 of file extbase/Classes/Mvc/Web/Response.php.

References Response\getContent(), and Response\sendHeaders().

sendHeaders ( )

Sends the HTTP headers.

If headers have already been sent, this method fails silently.

Returns
void

Definition at line 213 of file extbase/Classes/Mvc/Web/Response.php.

References Response\getHeaders().

Referenced by Response\send(), and Response\shutdown().

setHeader (   $name,
  $value,
  $replaceExistingHeader = true 
)

Sets the specified HTTP header

Parameters
string$nameName of the header, for example "Location", "Content-Description" etc.
mixed$valueThe value of the given header
bool$replaceExistingHeaderIf a header with the same name should be replaced. Default is TRUE.
Exceptions
InvalidArgumentException
Returns
void

Definition at line 171 of file extbase/Classes/Mvc/Web/Response.php.

setRequest ( \TYPO3\CMS\Extbase\Mvc\Web\Request  $request)
Parameters
\TYPO3\CMS\Extbase\Mvc\Web\Request$request

Definition at line 276 of file extbase/Classes/Mvc/Web/Response.php.

References Response\$request.

setStatus (   $code,
  $message = null 
)

Sets the HTTP status code and (optionally) a customized message.

Parameters
int$codeThe status code
string$messageIf specified, this message is sent instead of the standard message
Exceptions
InvalidArgumentException if the specified status code is not valid
Returns
void

Definition at line 138 of file extbase/Classes/Mvc/Web/Response.php.

shutdown ( )

Sends additional headers and returns the content

Returns
null|string

Implements ResponseInterface.

Definition at line 294 of file extbase/Classes/Mvc/Web/Response.php.

References Response\getAdditionalHeaderData(), Response\getTypoScriptFrontendController(), and Response\sendHeaders().

Member Data Documentation

$additionalHeaderData = []
protected
$environmentService
protected
$headers = []
protected

Definition at line 33 of file extbase/Classes/Mvc/Web/Response.php.

$request
protected
$statusCode
protected

Definition at line 47 of file extbase/Classes/Mvc/Web/Response.php.

$statusMessage = 'OK'
protected

Definition at line 54 of file extbase/Classes/Mvc/Web/Response.php.

Referenced by Response\getHeaders(), and Response\getStatus().

$statusMessages
protected
Initial value:
= [
100 => 'Continue'

Definition at line 68 of file extbase/Classes/Mvc/Web/Response.php.