1 | <?php |
||
33 | class Md2HtmlExtension extends AbstractExtension |
||
34 | { |
||
35 | /** |
||
36 | * @var Markdown |
||
37 | */ |
||
38 | private $parser; |
||
39 | |||
40 | /** |
||
41 | * @var array |
||
42 | */ |
||
43 | private $localeCodes; |
||
44 | |||
45 | /** |
||
46 | * @var array |
||
47 | */ |
||
48 | private $locales; |
||
49 | |||
50 | public function __construct(Markdown $parser, string $locales) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function getFilters(): array |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function getFunctions(): array |
||
75 | |||
76 | /** |
||
77 | * Transforms the given Markdown content into HTML content. |
||
78 | */ |
||
79 | public function markdownToHtml(string $content): string |
||
83 | |||
84 | /** |
||
85 | * Takes the list of codes of the locales (languages) enabled in the |
||
86 | * application and returns an array with the name of each locale written |
||
87 | * in its own language (e.g. English, Français, Español, etc.). |
||
88 | */ |
||
89 | public function getLocales(): array |
||
102 | } |
||
103 |