1 | <?php |
||
9 | final class OptimalEncodedHeaderValue |
||
10 | { |
||
11 | public 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 | 150 | public function __construct(string $value, bool $phrase = false) |
|
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | 150 | public function __toString(): string |
|
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | 41 | public function getEncoding(): string |
|
82 | |||
83 | /** |
||
84 | * @param string $value |
||
85 | * @return OptimalEncodedHeaderValue |
||
86 | */ |
||
87 | 51 | public static function forPhrase(string $value): self |
|
91 | } |
||
92 |