forked from jkapuscik2/design-patterns-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequest.php
More file actions
34 lines (25 loc) · 723 Bytes
/
Request.php
File metadata and controls
34 lines (25 loc) · 723 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
<?php
namespace Behavioral\ChainOfResponsibility;
class Request {
private $params;
private $server;
public function __construct (array $params, array $server) {
$this->params = $params;
$this->server = $server;
}
public function getParam ($name) {
return $this->params[$name];
}
public function getParams () {
return $this->params;
}
public function hasParam (string $name) {
return array_key_exists($name, $this->params);
}
public function getServerParam (string $name) {
return $this->server[$name];
}
public function hasServerParam (string $name) {
return array_key_exists($name, $this->server);
}
}