ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
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
y
z
Ö
+
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
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
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 Tue Apr 1 2025 22:02:16 for ILIAS by
1.8.13 (using
Doxyfile
)