| 1 | <?php |
||
| 15 | class ProcessedBody |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $body; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var array|AnchorLink[] |
||
| 24 | */ |
||
| 25 | private $links = []; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * ProcessedBody constructor. |
||
| 29 | * |
||
| 30 | * @param string $body |
||
| 31 | * @param array $links |
||
| 32 | */ |
||
| 33 | public function __construct(string $body, array $links = []) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param AnchorLink $link |
||
| 41 | * @return $this|ProcessedBody |
||
| 42 | */ |
||
| 43 | public function addAnchorLink(AnchorLink $link): ProcessedBody |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function getContent(): string |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return array |
||
| 60 | */ |
||
| 61 | public function getLinks(): array |
||
| 71 | } |
||
| 72 |