1 | <?php |
||
6 | final class Boundary |
||
7 | { |
||
8 | /** |
||
9 | * @var string |
||
10 | */ |
||
11 | private $identifier; |
||
12 | |||
13 | /** |
||
14 | * Boundary constructor. |
||
15 | * @param string $identifier |
||
16 | */ |
||
17 | 18 | public function __construct(string $identifier) |
|
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | 11 | public function __toString(): string |
|
31 | |||
32 | /** |
||
33 | * @return Boundary |
||
34 | */ |
||
35 | 2 | public static function newRandomBoundary() |
|
39 | |||
40 | /** |
||
41 | * @param string $value |
||
42 | */ |
||
43 | 18 | private function assert(string $value): void |
|
49 | |||
50 | /** |
||
51 | * @param $value |
||
52 | * @return bool |
||
53 | */ |
||
54 | 18 | private function validate(string $value): bool |
|
71 | |||
72 | } |