ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ILIAS\HTTP\GlobalHttpState Interface Reference

Interface GlobalHttpState. More...

+ Inheritance diagram for ILIAS\HTTP\GlobalHttpState:
+ Collaboration diagram for ILIAS\HTTP\GlobalHttpState:

Public Member Functions

 request ()
 Returns the current psr-7 server request. More...
 
 response ()
 Returns the current psr-7 response. More...
 
 cookieJar ()
 Returns a cookie jar which has all cookies known by the ILIAS response. More...
 
 saveRequest (ServerRequestInterface $request)
 Saves the given request for further use. More...
 
 saveResponse (ResponseInterface $response)
 Saves the given response for further use. More...
 
 sendResponse ()
 Render the current response hold by ILIAS. More...
 

Detailed Description

Interface GlobalHttpState.

The GlobalHttpState expose functions to access the cookies, request and response. In addition there are functions to save the request and response back into the service. The save functionality is only provided due to the current architectural state of ILIAS.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Nicolas Schäfli ns@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Since
5.3
Version
1.0.0

Definition at line 24 of file GlobalHttpState.php.

Member Function Documentation

◆ cookieJar()

ILIAS\HTTP\GlobalHttpState::cookieJar ( )

Returns a cookie jar which has all cookies known by the ILIAS response.

Make sure to call the saveResponse method when the cookies are rendered into the response object.

Returns
CookieJar

Implemented in ILIAS\DI\HTTPServices.

◆ request()

ILIAS\HTTP\GlobalHttpState::request ( )

Returns the current psr-7 server request.

Returns
ServerRequestInterface

Implemented in ILIAS\DI\HTTPServices.

Referenced by ilWebAccessChecker\__construct().

+ Here is the caller graph for this function:

◆ response()

ILIAS\HTTP\GlobalHttpState::response ( )

Returns the current psr-7 response.

Returns
ResponseInterface

Implemented in ILIAS\DI\HTTPServices.

◆ saveRequest()

ILIAS\HTTP\GlobalHttpState::saveRequest ( ServerRequestInterface  $request)

Saves the given request for further use.

The request should only be saved if absolutely necessary. There is a possibility that the request can't be saved back in the near future.

Parameters
ServerRequestInterface$requestThe server request which should be saved.
Returns
void

Implemented in ILIAS\DI\HTTPServices.

◆ saveResponse()

ILIAS\HTTP\GlobalHttpState::saveResponse ( ResponseInterface  $response)

Saves the given response for further use.

Parameters
ResponseInterface$responseThe response which should be saved.
Returns
void

Implemented in ILIAS\DI\HTTPServices.

◆ sendResponse()

ILIAS\HTTP\GlobalHttpState::sendResponse ( )

Render the current response hold by ILIAS.

Exceptions
ResponseSendingExceptionEach subsequent call will throw this exception.
Returns
void

Implemented in ILIAS\DI\HTTPServices.


The documentation for this interface was generated from the following file: