1 | <?php |
||
21 | class ContentObserver |
||
22 | { |
||
23 | /** |
||
24 | * @var Parser |
||
25 | */ |
||
26 | private $parser; |
||
27 | |||
28 | /** |
||
29 | * @var RenderersRepository |
||
30 | */ |
||
31 | private $repository; |
||
32 | |||
33 | /** |
||
34 | * ContentObserver constructor. |
||
35 | * @param Parser $parser |
||
36 | * @param RenderersRepository $repository |
||
37 | */ |
||
38 | public function __construct(Parser $parser, RenderersRepository $repository) |
||
43 | |||
44 | /** |
||
45 | * @param DocsPage $page |
||
46 | * @throws \InvalidArgumentException |
||
47 | */ |
||
48 | public function saving(DocsPage $page): void |
||
56 | |||
57 | /** |
||
58 | * @param DocsPage $page |
||
59 | * @return ContentRendererInterface |
||
60 | * @throws \InvalidArgumentException |
||
61 | */ |
||
62 | private function getRenderer(DocsPage $page): ContentRendererInterface |
||
66 | |||
67 | /** |
||
68 | * @param ContentRendererInterface $renderer |
||
69 | * @param string $body |
||
70 | * @return ProcessedBody |
||
71 | */ |
||
72 | private function render(ContentRendererInterface $renderer, string $body): ProcessedBody |
||
80 | } |
||
81 |