| 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 | 3 | ||
| 20 | /** |
||
| 21 | 3 | * @param Twig_Environment $environment |
|
| 22 | 3 | */ |
|
| 23 | public function __construct(Twig_Environment $environment) |
||
| 27 | |||
| 28 | /** |
||
| 29 | 1 | * Get a copy that uses a different template. |
|
| 30 | * |
||
| 31 | 1 | * @param string $template |
|
| 32 | * |
||
| 33 | * @return static |
||
| 34 | */ |
||
| 35 | public function withTemplate($template) |
||
| 42 | 1 | ||
| 43 | /** |
||
| 44 | 1 | * @inheritDoc |
|
| 45 | */ |
||
| 46 | public function format($content) |
||
| 50 | } |
||
| 51 |