1 | <?php |
||
7 | class Param |
||
8 | { |
||
9 | private $name; |
||
10 | |||
11 | private $value; |
||
12 | |||
13 | /** |
||
14 | * Param constructor. |
||
15 | * |
||
16 | * @param string $name |
||
17 | * @param mixed $value |
||
18 | */ |
||
19 | 12 | public function __construct(string $name, $value) |
|
24 | |||
25 | /** |
||
26 | * @return string |
||
27 | */ |
||
28 | 2 | public function getName(): string |
|
29 | { |
||
30 | 2 | return $this->name; |
|
31 | } |
||
32 | |||
33 | /** |
||
34 | * @param string $value |
||
35 | * @return mixed |
||
36 | */ |
||
37 | 12 | private function escape($value = '') |
|
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | 5 | public function getValue() |
|
49 | |||
50 | 1 | public function __toString(): string |
|
64 | |||
65 | 1 | public function toArray(): array |
|
69 | } |
||
70 |