ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\HTTP\RawHTTPServices Class Reference

Provides an interface to the ILIAS HTTP services. More...

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

Public Member Functions

 __construct (private ResponseSenderStrategy $sender, private CookieJarFactory $cookieJarFactory, private RequestFactory $requestFactory, private ResponseFactory $responseFactory, private DurationFactory $durationFactory)
 RawHTTPServices constructor. More...
 
 durations ()
 
 wrapper ()
 
 cookieJar ()
 
 request ()
 
 response ()
 
 saveRequest (ServerRequestInterface $request)
 
 saveResponse (ResponseInterface $response)
 
 sendResponse ()
 
 close ()
 

Private Attributes

ServerRequestInterface $request = null
 
ResponseInterface $response = null
 

Detailed Description

Provides an interface to the ILIAS HTTP services.

Author
Nicolas Schäfli ns@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 36 of file RawHTTPServices.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\HTTP\RawHTTPServices::__construct ( private ResponseSenderStrategy  $sender,
private CookieJarFactory  $cookieJarFactory,
private RequestFactory  $requestFactory,
private ResponseFactory  $responseFactory,
private DurationFactory  $durationFactory 
)

RawHTTPServices constructor.

Parameters
ResponseSenderStrategy$senderA response sender strategy.
CookieJarFactory$cookieJarFactoryCookie Jar implementation.

Definition at line 48 of file RawHTTPServices.php.

49  {
50  }

Member Function Documentation

◆ close()

ILIAS\HTTP\RawHTTPServices::close ( )

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 129 of file RawHTTPServices.php.

References exit.

129  : void
130  {
131  exit;
132  }
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ cookieJar()

ILIAS\HTTP\RawHTTPServices::cookieJar ( )

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 66 of file RawHTTPServices.php.

References ILIAS\HTTP\RawHTTPServices\response().

Referenced by ILIAS\HTTP\RawHTTPServices\sendResponse().

66  : CookieJar
67  {
68  return $this->cookieJarFactory->fromResponse($this->response());
69  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ durations()

ILIAS\HTTP\RawHTTPServices::durations ( )

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 52 of file RawHTTPServices.php.

52  : DurationFactory
53  {
54  return $this->durationFactory;
55  }

◆ request()

ILIAS\HTTP\RawHTTPServices::request ( )

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 75 of file RawHTTPServices.php.

References ILIAS\HTTP\RawHTTPServices\$request, and null.

Referenced by ILIAS\HTTP\RawHTTPServices\saveRequest(), and ILIAS\HTTP\RawHTTPServices\wrapper().

76  {
77  if ($this->request === null) {
78  $this->request = $this->requestFactory->create();
79  }
80 
81  return $this->request;
82  }
ServerRequestInterface $request
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ response()

ILIAS\HTTP\RawHTTPServices::response ( )

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 88 of file RawHTTPServices.php.

References ILIAS\HTTP\RawHTTPServices\$response, and null.

Referenced by ILIAS\HTTP\RawHTTPServices\cookieJar(), ILIAS\HTTP\RawHTTPServices\saveResponse(), and ILIAS\HTTP\RawHTTPServices\sendResponse().

88  : ResponseInterface
89  {
90  if ($this->response === null) {
91  $this->response = $this->responseFactory->create();
92  }
93 
94  return $this->response;
95  }
ResponseInterface $response
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ saveRequest()

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

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 101 of file RawHTTPServices.php.

References ILIAS\HTTP\RawHTTPServices\$request, and ILIAS\HTTP\RawHTTPServices\request().

101  : void
102  {
103  $this->request = $request;
104  }
ServerRequestInterface $request
+ Here is the call graph for this function:

◆ saveResponse()

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

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 110 of file RawHTTPServices.php.

References ILIAS\HTTP\RawHTTPServices\$response, and ILIAS\HTTP\RawHTTPServices\response().

110  : void
111  {
112  $this->response = $response;
113  }
ResponseInterface $response
+ Here is the call graph for this function:

◆ sendResponse()

ILIAS\HTTP\RawHTTPServices::sendResponse ( )

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 119 of file RawHTTPServices.php.

References ILIAS\HTTP\RawHTTPServices\cookieJar(), and ILIAS\HTTP\RawHTTPServices\response().

119  : void
120  {
121  // Render Cookies to the response.
122  $response = $this->response();
123  $response = $this->cookieJar()->renderIntoResponseHeader($response);
124 
125  $this->sender->sendResponse($response);
126  }
ResponseInterface $response
+ Here is the call graph for this function:

◆ wrapper()

ILIAS\HTTP\RawHTTPServices::wrapper ( )

Implements ILIAS\HTTP\GlobalHttpState.

Definition at line 57 of file RawHTTPServices.php.

References ILIAS\HTTP\RawHTTPServices\request().

57  : WrapperFactory
58  {
59  return new WrapperFactory($this->request());
60  }
+ Here is the call graph for this function:

Field Documentation

◆ $request

ServerRequestInterface ILIAS\HTTP\RawHTTPServices::$request = null
private

◆ $response

ResponseInterface ILIAS\HTTP\RawHTTPServices::$response = null
private

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