ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
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
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
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
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
x
+
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
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilTermsOfServiceJsonResponse.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'Services/JSON/classes/class.ilJsonUtil.php'
;
5
11
class
ilTermsOfServiceJsonResponse
12
{
13
const
STATUS_SUCCESS
= 1;
14
const
STATUS_FAILURE
= 2;
15
19
protected
$body
;
20
24
public
function
__construct
()
25
{
26
$this->
initHttpBody
();
27
}
28
32
protected
function
initHttpBody
()
33
{
34
$this->body =
new
stdClass();
35
$this->body->status = self::STATUS_SUCCESS;
36
$this->body->body =
''
;
37
}
38
42
public
function
setStatus
($status)
43
{
44
$this->body->status = $status;
45
}
46
50
public
function
setBody
(
$body
)
51
{
52
$this->body->body =
$body
;
53
}
54
58
public
function
__toString
()
59
{
60
header(
"Content-type: application/json; charset=UTF-8"
);
61
echo
ilJsonUtil::encode
($this->body);
62
exit
();
63
}
64
}
ilTermsOfServiceJsonResponse\setStatus
setStatus($status)
Definition:
class.ilTermsOfServiceJsonResponse.php:42
exit
exit
Definition:
login.php:54
ilTermsOfServiceJsonResponse\STATUS_FAILURE
const STATUS_FAILURE
Definition:
class.ilTermsOfServiceJsonResponse.php:14
ilTermsOfServiceJsonResponse
Let this class derive from a real http response class in future.
Definition:
class.ilTermsOfServiceJsonResponse.php:11
ilTermsOfServiceJsonResponse\__construct
__construct()
Definition:
class.ilTermsOfServiceJsonResponse.php:24
ilJsonUtil\encode
static encode($mixed, $suppress_native=false)
Definition:
class.ilJsonUtil.php:14
ilTermsOfServiceJsonResponse\setBody
setBody($body)
Definition:
class.ilTermsOfServiceJsonResponse.php:50
ilTermsOfServiceJsonResponse\$body
$body
Definition:
class.ilTermsOfServiceJsonResponse.php:19
ilTermsOfServiceJsonResponse\__toString
__toString()
Definition:
class.ilTermsOfServiceJsonResponse.php:58
ilTermsOfServiceJsonResponse\initHttpBody
initHttpBody()
Definition:
class.ilTermsOfServiceJsonResponse.php:32
ilTermsOfServiceJsonResponse\STATUS_SUCCESS
const STATUS_SUCCESS
Definition:
class.ilTermsOfServiceJsonResponse.php:13
Services
TermsOfService
classes
class.ilTermsOfServiceJsonResponse.php
Generated on Mon Mar 31 2025 19:00:53 for ILIAS by
1.8.13 (using
Doxyfile
)