1 | <?php |
||
7 | class MarkdownFile |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $filename; |
||
13 | |||
14 | /** |
||
15 | * Raw markdown content |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | public $content; |
||
20 | |||
21 | /** |
||
22 | * The parsed title |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | public $title; |
||
27 | |||
28 | /** |
||
29 | * Parsed HTML content without the title |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | public $html; |
||
34 | |||
35 | /** |
||
36 | * Parsed metadata |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | public $metadata; |
||
41 | |||
42 | /** |
||
43 | * @param string $filename |
||
44 | */ |
||
45 | 6 | public function __construct($filename) |
|
55 | |||
56 | /** |
||
57 | * @return $this |
||
58 | */ |
||
59 | 3 | public function load() |
|
67 | |||
68 | /** |
||
69 | * @param string $content_path |
||
70 | * @param bool $recursive |
||
71 | * @param string $base_path |
||
72 | * @return array |
||
73 | */ |
||
74 | 3 | public static function getList($content_path, $recursive = true, $base_path = '') |
|
99 | } |
||
100 |