Completed
Pull Request — master (#61)
by Vladimir
03:02
created

RstEngine::getExtensions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * @copyright 2018 Vladimir Jimenez
4
 * @license   https://github.com/allejo/stakx/blob/master/LICENSE.md MIT
5
 */
6
7
namespace allejo\stakx\MarkupEngine;
8
9
use allejo\stakx\Markup\RstSyntaxBlock;
10
use allejo\stakx\Service;
11
use Gregwar\RST\Parser;
12
13
class RstEngine extends Parser implements MarkupEngine
14
{
15
    public function __construct($environment = null, $kernel = null)
16
    {
17
        parent::__construct($environment, $kernel);
18
19
        $this->registerDirective(new RstSyntaxBlock());
20
        $this->setIncludePolicy(true, Service::getWorkingDirectory());
21
    }
22
23
    public function getTemplateTag()
24
    {
25
        return 'rst';
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function getExtensions()
32
    {
33
        return [
34
            'rst',
35
        ];
36
    }
37
}
38