@@ 13-32 (lines=20) @@ | ||
10 | * @see http://michelf.ca/projects/php-markdown/ Michel Fortin's PHP Markdown |
|
11 | * @author Matthias Glaub <[email protected]> |
|
12 | */ |
|
13 | class MichelfPHPMarkdownAdapter extends AbstractMichelfPHPMarkdown implements MarkdownAdapterInterface |
|
14 | { |
|
15 | ||
16 | /** |
|
17 | * |
|
18 | * @var Markdown |
|
19 | */ |
|
20 | private $parser; |
|
21 | ||
22 | public function __construct(array $options = null) |
|
23 | { |
|
24 | $this->parser = new Markdown(); |
|
25 | $this->setParserOptions($this->parser, $options); |
|
26 | } |
|
27 | ||
28 | public function transformText($text) |
|
29 | { |
|
30 | return $this->parser->transform($text); |
|
31 | } |
|
32 | } |
|
33 |
@@ 12-31 (lines=20) @@ | ||
9 | * @see http://michelf.ca/projects/php-markdown/extra/ Michel Fortin's PHP Markdown Extra |
|
10 | * @author Matthias Glaub <[email protected]> |
|
11 | */ |
|
12 | class MichelfPHPMarkdownExtraAdapter extends AbstractMichelfPHPMarkdown implements MarkdownAdapterInterface |
|
13 | { |
|
14 | ||
15 | /** |
|
16 | * |
|
17 | * @var MarkdownExtra |
|
18 | */ |
|
19 | private $parser; |
|
20 | ||
21 | public function __construct(array $options = null) |
|
22 | { |
|
23 | $this->parser = new MarkdownExtra(); |
|
24 | $this->setParserOptions($this->parser, $options); |
|
25 | } |
|
26 | ||
27 | public function transformText($text) |
|
28 | { |
|
29 | return $this->parser->transform($text); |
|
30 | } |
|
31 | } |
|
32 |