1: | <?php |
2: | namespace Sphp\core{ |
3: | class Request { |
4: | /** @var string $method Request Method */ |
5: | public $method = ""; |
6: | /** @var string $mode Default SERVER OR CLI or CGI */ |
7: | public $mode = "SERVER"; /** @var string $protocol Request Protocol */ |
8: | public $protocol = ""; |
9: | /** @var boolean $blnsecure Request SSL */ |
10: | public $blnsecure = false; |
11: | /** @var string $uri Request URI */ |
12: | public $uri = ""; |
13: | /** @var string $scriptpath Engine Script Path */ |
14: | public $scriptpath = ""; |
15: | /** @var array $argv Command Line Arguments */ |
16: | public $argv = array(); |
17: | /** @var string $type Request Type Default NORMAL or AJAX or SOAP */ |
18: | public $type = "NORMAL"; /** @var boolean $isNativeClient true if application embed with browser */ |
19: | public $isNativeClient = false; |
20: | /** |
21: | * Get All Request Headers |
22: | * @return array() |
23: | */ |
24: | public function getClientHeaders() {} |
25: | /** |
26: | * Advance Function, Internal use |
27: | */ |
28: | public function parseRequest() {} |
29: | /** |
30: | * True if Application run with SphpServer Mode or Browser embed mode |
31: | * False on Web Server Mode or Console Mode |
32: | * @return boolean |
33: | */ |
34: | public function isNativeApp() {} |
35: | /** |
36: | * Check if client demand JSON response. |
37: | * @return boolean |
38: | */ |
39: | public function isAJAX() {} |
40: | /** |
41: | * Read Browser Get Method Data |
42: | * @param string $name key |
43: | * @param boolean $blnRaw true mean, no escaping |
44: | * @return string|array |
45: | */ |
46: | public function get($name, $blnRaw = false) {} |
47: | /** |
48: | * Read Browser Post Method Data |
49: | * @param string $name key |
50: | * @param boolean $blnRaw true mean, no escaping |
51: | * @return string|array |
52: | */ |
53: | public function post($name, $blnRaw = false) {} |
54: | /** |
55: | * Check if Request has key |
56: | * @param string $name key |
57: | * @return boolean |
58: | */ |
59: | public function isRequest($name) {} |
60: | /** |
61: | * Check if Cookie has key |
62: | * @param string $name key |
63: | * @return boolean |
64: | */ |
65: | public function isCookie($name) {} |
66: | /** |
67: | * Check if Session has key |
68: | * @param string $name key |
69: | * @return boolean |
70: | */ |
71: | public function isSession($name) {} |
72: | /** |
73: | * Check if Server has key |
74: | * @param string $name key |
75: | * @return boolean |
76: | */ |
77: | public function isServer($name) {} |
78: | /** |
79: | * Check if Post has key |
80: | * @param string $name key |
81: | * @return boolean |
82: | */ |
83: | public function isPost($name) {} |
84: | /** |
85: | * Check if Get has key |
86: | * @param string $name key |
87: | * @return boolean |
88: | */ |
89: | public function isGet($name) {} |
90: | /** |
91: | * Check if File has key |
92: | * @param string $name key |
93: | * @return boolean |
94: | */ |
95: | public function isFile($name) {} |
96: | /** |
97: | * Read/Write Request key |
98: | * @param string $name key |
99: | * @param boolean $blnRaw true mean, no escaping at time of reading |
100: | * @param string|array $value null mean read key |
101: | * @return string |
102: | */ |
103: | public function request($name, $blnRaw = false,$value=null) {} |
104: | /** |
105: | * Read Raw Request Data |
106: | * @return string |
107: | */ |
108: | public function requestStream() {} |
109: | /** |
110: | * Write/Read Cookie |
111: | * @param string $name key |
112: | * @param boolean $blnRaw true mean, no escaping at time of reading |
113: | * @param string|array $value null mean read key |
114: | * @param int $expire |
115: | * @param string $path |
116: | * @param string $domain |
117: | * @param boolean $secure |
118: | * @param boolean $httponly |
119: | * @return string |
120: | */ |
121: | public function cookie($name, $value = null, $blnRaw = false,$expire=-1,$path='/', $domain="", $secure=false, $httponly=true) {} |
122: | /** |
123: | * Write/Read Cookie with tamper protection. Bad cookie return empty value. |
124: | * @param string $name key |
125: | * @param boolean $blnRaw true mean, no escaping at time of reading |
126: | * @param string|array $value null mean read key |
127: | * @param int $expire |
128: | * @param string $path |
129: | * @param string $domain |
130: | * @param boolean $secure |
131: | * @param boolean $httponly |
132: | * @return string |
133: | */ |
134: | public function cookie_secure($name, $value = null, $blnRaw = false,$expire=-1,$path='/', $domain="", $secure=false, $httponly=true,$prefix="") {} |
135: | /** |
136: | * Advance Function, Internal use |
137: | */ |
138: | public function restoreSessionFromStorage() {} |
139: | /** |
140: | * Advance Function, Internal use |
141: | */ |
142: | public function saveSessionToStorage() {} |
143: | /** |
144: | * Delete Cookie |
145: | * @param string $name key |
146: | */ |
147: | public function unsetCookie($name) {} |
148: | /** |
149: | * Delete Session Variable |
150: | * @param string $name key |
151: | */ |
152: | public function unsetSession($name) {} |
153: | /** |
154: | * Destroy All Session Data |
155: | */ |
156: | public function destroySession() {} |
157: | /** |
158: | * Read/Write Session key |
159: | * @param string $name key |
160: | * @param string|array $value null mean read key |
161: | * @return string|array |
162: | */ |
163: | public function session($name, $value = null) {} |
164: | /** |
165: | * Advance Function, Internal use |
166: | */ |
167: | public function setUseServerVariables() {} |
168: | /** |
169: | * Advance Function, Internal use |
170: | */ |
171: | public function svar($name, $value = null) {} |
172: | /** |
173: | * Read $_SERVER key |
174: | * @param string $name key |
175: | * @return string |
176: | */ |
177: | public function server($name) {} |
178: | /** |
179: | * Read $_FILES key |
180: | * @param string $name key |
181: | * @return string |
182: | */ |
183: | public function files($name) {} |
184: | /** |
185: | * Advance Function, Internal use |
186: | */ |
187: | public function escapetag($str) {} |
188: | /** |
189: | * Advance Function, Internal use |
190: | * @deprecated 4.4.8 |
191: | */ |
192: | public function getEngineRootPath() {} |
193: | /** |
194: | * Advance Function, Internal use |
195: | */ |
196: | public function getURLSafe($val) {} |
197: | /** |
198: | * Advance Function, Internal use |
199: | */ |
200: | public function getURLSafeRet($val) {} |
201: | } |
202: | } |
203: |