-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemEnvironmentInterface.php
More file actions
98 lines (85 loc) · 2.05 KB
/
SystemEnvironmentInterface.php
File metadata and controls
98 lines (85 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* Definition of SystemEnvironmentInterface
*
* @copyright 2013-today Justso GmbH
* @author j.schirrmacher@justso.de
* @package justso
*/
namespace justso\justapi;
/**
* API of classes handling the system environment like headers, requests and output
*/
interface SystemEnvironmentInterface
{
/**
* @return FileSystemInterface
*/
public function getFileSystem();
/**
* @return RequestHelper
*/
public function getRequestHelper();
public function getHeader();
public function sendHeader($header);
/**
* @param string $name
* @param string $value
* @param int $expire
* @param string $path
* @param string $domain
* @param bool $secure
* @param bool $httpOnly
* @return bool
*/
public function sendCookie(
$name,
$value = null,
$expire = null,
$path = null,
$domain = null,
$secure = null,
$httpOnly = null
);
public function sendResponse($response);
/**
* Changes the current user account. The permissions of this account are used for subsequent calls in this request.
*
* @param int $user key of user
* @return void
*/
public function switchUser($user);
/**
* Sends a standard HTTP response.
*
* @param string $code Code and Code-text
* @param string $mime MIME-Type
* @param string $message Response text
*/
public function sendResult($code, $mime, $message);
/**
* Sends $data JSON encoded as a successful HTTP response.
*
* @param mixed $data
*/
public function sendJSONResult($data);
/**
* @return Session
*/
public function getSession();
/**
* Returns the dependency injection container
*
* @return DependencyContainerInterface
*/
public function getDIC();
/**
* @return Bootstrap
*/
public function getBootstrap();
/**
* Reads all from stdin
* @return string
*/
public function getStdInput();
}