| 1 | <?php |
||
| 6 | final class Tag |
||
| 7 | { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $tag; |
||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | private $tagLength; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Tag constructor. |
||
| 20 | * @param string $tag |
||
| 21 | */ |
||
| 22 | 9 | public function __construct(string $tag) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | 7 | public function __toString(): string |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $line |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 6 | public function extractBodyFromLine(string $line): string |
|
| 54 | |||
| 55 | /** |
||
| 56 | * @param int $nonce |
||
| 57 | * @return Tag |
||
| 58 | */ |
||
| 59 | 8 | public static function fromNonce(int $nonce): self |
|
| 63 | } |