1 | <?php |
||
8 | final class TwigFormatter extends HtmlFormatter |
||
9 | { |
||
10 | /** |
||
11 | * @var Twig_Environment |
||
12 | */ |
||
13 | private $environment; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $template; |
||
19 | |||
20 | /** |
||
21 | * @param Twig_Environment $environment |
||
22 | */ |
||
23 | 3 | public function __construct(Twig_Environment $environment) |
|
27 | |||
28 | /** |
||
29 | * Get a copy that uses a different template. |
||
30 | * |
||
31 | * @param string $template |
||
32 | * |
||
33 | * @return static |
||
34 | */ |
||
35 | 1 | public function withTemplate($template) |
|
42 | |||
43 | /** |
||
44 | * @inheritDoc |
||
45 | */ |
||
46 | 1 | public function format($content) |
|
50 | } |
||
51 |