-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequest.php
More file actions
39 lines (33 loc) · 882 Bytes
/
Request.php
File metadata and controls
39 lines (33 loc) · 882 Bytes
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
<?php
/*
* Task Manager
* J. Femister
* CSE 297
*/
class Request {
private $request = array();
public function __construct() {
if (!empty($_POST)) $this->request = $_POST;
if (!empty($_GET)) $this->request = $_GET;
}
public function get($name) {
if (array_key_exists($name, $this->request)) return $this->request[$name];
return '';
}
public function set($name, $value) {
$this->request[$name] = $value;
}
public function getCommand() {
if (isset($this->request['cmd']))
return $this->request['cmd'];
else
return 'execute';
}
public function getGroup() {
if (isset($this->request['grp']))
return $this->request['grp'];
else
return 'DisplayList';
}
}
?>