1 | <?php |
||
8 | class Harmonizer |
||
9 | { |
||
10 | public $server; |
||
11 | |||
12 | /** |
||
13 | * Create a new Harmonizer instance. |
||
14 | * |
||
15 | * @param array $server array to infer |
||
16 | */ |
||
17 | public function __construct(array &$server) |
||
21 | |||
22 | /** |
||
23 | * Add entry to an array iff it doesn't exist an entry with the same key. |
||
24 | * |
||
25 | * @param array $array array of entries |
||
26 | * @param mixed $key key of new entry |
||
27 | * @param mixed $value value of new entry |
||
28 | */ |
||
29 | private function arrayAdd(array &$array, $key, $value) |
||
35 | |||
36 | /** |
||
37 | * Infering (in-place) missing REDIRECT_ variables in `$server`. |
||
38 | * |
||
39 | * @return static |
||
40 | */ |
||
41 | public function harmonizeRedirectVariables() |
||
57 | |||
58 | /** |
||
59 | * Infering (in-place) missing user variables in `$server`. |
||
60 | * |
||
61 | * @return static |
||
62 | */ |
||
63 | public function harmonizeUserVariables() |
||
74 | |||
75 | /** |
||
76 | * Infering (in-place) missing authorization variables in `$server`. |
||
77 | * |
||
78 | * @return static |
||
79 | */ |
||
80 | public function harmonizeHttpAuth() |
||
100 | |||
101 | /** |
||
102 | * Infering (in-place) missing variables in `$server`. |
||
103 | * |
||
104 | * @param array $server array to infer |
||
105 | * |
||
106 | * @return array $server |
||
107 | */ |
||
108 | public static function harmonize(array &$server) |
||
115 | } |
||
116 |