1 | <?php |
||
9 | final class OptimalEncodedHeaderValue |
||
10 | { |
||
11 | private const FOLDING = "\r\n "; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $encoded; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $encoding = '7bit'; |
||
22 | |||
23 | /** |
||
24 | * @param string $value |
||
25 | * @param bool $phrase |
||
26 | */ |
||
27 | 148 | public function __construct(string $value, bool $phrase = false) |
|
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | 148 | public function __toString(): string |
|
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | 42 | public function getEncoding(): string |
|
74 | |||
75 | /** |
||
76 | * @param string $value |
||
77 | * @return OptimalEncodedHeaderValue |
||
78 | */ |
||
79 | 51 | public static function forPhrase(string $value): self |
|
83 | } |
||
84 |