| Code Coverage
| Classes and Traits | Functions and Methods | Lines
Total |  | 100.00% | 1 / 1 |  | 100.00% | 3 / 3 | CRAP |  | 100.00% | 5 / 5
TemplateExtension |  | 100.00% | 1 / 1 |  | 100.00% | 3 / 3 | 3 |  | 100.00% | 5 / 5
__construct(FilesystemLoader $loader) |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 2 / 2
setController($controller) |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 2 / 2
getName() |  | 100.00% | 1 / 1 | 1 |  | 100.00% | 1 / 1

1 | <?php
2 |
3 | namespace BodyRep\Twig\Extension;
4 |
5 | use Symfony\Component\HttpKernel\KernelInterface;
6 | use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
7 | use CG\Core\ClassUtils;
8 |
9 | class TemplateExtension extends \Twig_Extension
10 | {
11 | protected $loader;
12 | protected $controller;
13 |
14 | public function __construct(FilesystemLoader $loader)
15 | {
16 | $this->loader = $loader;
17 | }
18 |
19 | public function setController($controller)
20 | {
21 | $this->controller = $controller;
22 | }
23 |
24 | /**
25 | * Returns the name of the extension.
26 | *
27 | * @return string The extension name
28 | */
29 | public function getName()
30 | {
31 | return 'demo';
32 | }
33 | }