1 | <?php |
||
13 | abstract class AbstractWriter implements WriterInterface |
||
14 | { |
||
15 | use GenerateSlug; |
||
16 | |||
17 | /** |
||
18 | * Destination that we should write to |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $destinationFolder; |
||
22 | |||
23 | /** |
||
24 | * Configuration options for writer |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $config; |
||
28 | |||
29 | /** |
||
30 | * @param string $destinationFolder Destination that we should write to. Should be the full path ending in / |
||
31 | */ |
||
32 | public function __construct($destinationFolder, $config) |
||
37 | |||
38 | /** |
||
39 | * Converts content from HTML to Markdown via pandoc |
||
40 | * |
||
41 | * @param $content |
||
42 | * @return string |
||
43 | */ |
||
44 | protected function toMarkdown($content) |
||
53 | |||
54 | /** |
||
55 | * Tests if markdown conversion is enabled |
||
56 | * @return bool |
||
57 | */ |
||
58 | protected function isMarkdownEnabled() { |
||
61 | } |