Total Complexity | 3 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Markdowner |
||
9 | { |
||
10 | /** |
||
11 | * Prepare content to be saved as HTML. |
||
12 | * |
||
13 | * @param string $text |
||
14 | * |
||
15 | * @return string |
||
16 | */ |
||
17 | public function toHTML($text) |
||
18 | { |
||
19 | $text = $this->preTransformText($text); |
||
20 | $text = MarkdownExtra::defaultTransform($text); |
||
21 | $text = SmartyPants::defaultTransform($text); |
||
22 | $text = $this->postTransformText($text); |
||
23 | |||
24 | return $text; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Pre transform text. |
||
29 | * |
||
30 | * @param string |
||
31 | * |
||
32 | * @return string |
||
33 | */ |
||
34 | protected function preTransformText($text) |
||
35 | { |
||
36 | return $text; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Posts a transform text. |
||
41 | * |
||
42 | * @param string |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | protected function postTransformText($text) |
||
49 | } |
||
50 | } |
||
51 |