ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
class.Response.php
Go to the documentation of this file.
1
<?php
2
19
namespace
ILIAS\COPage\Editor\Server
;
20
24
class
Response
25
{
29
protected
$data
= [];
30
31
protected \ILIAS\HTTP\Services
$http
;
32
36
public
function
__construct
(
$data
)
37
{
38
global
$DIC
;
39
40
$this->
http
= $DIC->http();
41
$this->data =
$data
;
42
}
43
44
public
function
send
(): void
45
{
46
$http =
$this->http
;
47
48
$string = json_encode($this->data);
49
$stream =
\ILIAS\Filesystem\Stream\Streams::ofString
($string);
50
$http->saveResponse($http
51
->response()
52
->withAddedHeader(
'Content-Type'
,
'application/json'
)
53
->withBody($stream));
54
$http->sendResponse();
55
$http->close();
56
}
57
}
ILIAS\COPage\Editor\Server\Response
Definition:
class.Response.php:24
ILIAS\COPage\Editor\Server\Response\$http
ILIAS HTTP Services $http
Definition:
class.Response.php:31
$DIC
global $DIC
Definition:
feed.php:28
ILIAS\COPage\Editor\Server
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.Response.php:19
ILIAS\FileDelivery\http
static http()
Fetches the global http state from ILIAS.
Definition:
HttpServiceAware.php:54
ILIAS\COPage\Editor\Server\Response\send
send()
Definition:
class.Response.php:44
ILIAS\COPage\Editor\Server\Response\__construct
__construct($data)
Definition:
class.Response.php:36
ILIAS\Filesystem\Stream\Streams\ofString
static ofString(string $string)
Creates a new stream with an initial value.
Definition:
Streams.php:43
ILIAS\COPage\Editor\Server\Response\$data
$data
Definition:
class.Response.php:29
Services
COPage
Editor
Server
class.Response.php
Generated on Sun Aug 31 2025 22:02:15 for ILIAS by
1.8.13 (using
Doxyfile
)