Total Complexity | 4 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
4 | final class Request extends \WebServCo\Framework\AbstractLibrary |
||
5 | { |
||
6 | /** |
||
7 | * Sanitized _SERVER data. |
||
8 | */ |
||
9 | protected $server = []; |
||
10 | /** |
||
11 | * Request method. |
||
12 | */ |
||
13 | protected $method; |
||
14 | /** |
||
15 | * Current script filename. Should most commonly be index.php |
||
16 | */ |
||
17 | protected $filename; |
||
18 | /** |
||
19 | * Script path. |
||
20 | * For HTTP requests this will be public web server subdirectory |
||
21 | * the project is located in. |
||
22 | * For CLI request this will be the script path |
||
23 | * (full or relative, depending on how the script was called). |
||
24 | */ |
||
25 | protected $path = ''; |
||
26 | /** |
||
27 | * Sanitized Framework customized target path. |
||
28 | */ |
||
29 | protected $target = ''; |
||
30 | /** |
||
31 | * Sanitized request query. |
||
32 | */ |
||
33 | protected $query = []; |
||
34 | /** |
||
35 | * Sanitized Framework customized CLI arguments. |
||
36 | * |
||
37 | * Excludes the script name and the second argument |
||
38 | * which is the Framework customized target path. |
||
39 | */ |
||
40 | protected $args = []; |
||
41 | |||
42 | use \WebServCo\Framework\Traits\RequestProcessTrait; |
||
43 | use \WebServCo\Framework\Traits\RequestServerTrait; |
||
44 | use \WebServCo\Framework\Traits\RequestUrlTrait; |
||
45 | |||
46 | public function __construct($config, $server, $post = []) |
||
51 | } |
||
52 | |||
53 | public function getQuery() |
||
54 | { |
||
55 | return $this->query; |
||
56 | } |
||
57 | |||
58 | public function getTarget() |
||
59 | { |
||
60 | return $this->target; |
||
61 | } |
||
62 | |||
63 | public function getArgs() |
||
66 | } |
||
67 | } |
||
68 |