Completed
Push — master ( 0a9273...806a7c )
by Rafał
8s
created

ThemeLoader::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
/*
4
 * This file is part of the takeit/AmpHtmlBundle package.
5
 *
6
 * (c) Rafał Muszyński <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Takeit\Bundle\AmpHtmlBundle\Loader;
13
14
final class ThemeLoader implements ThemeLoaderInterface
15
{
16
    /**
17
     * @var \Twig_Loader_Filesystem
18
     */
19
    private $filesystem;
20
21
    /**
22
     * @var string
23
     */
24
    private $themePath;
25
26
    /**
27
     * @param \Twig_Loader_Filesystem $filesystem
28
     * @param $themePath
29
     */
30
    public function __construct(\Twig_Loader_Filesystem $filesystem, $themePath)
31
    {
32
        $this->filesystem = $filesystem;
33
        $this->themePath = $themePath;
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function load()
40
    {
41
        $this->filesystem->addPath($this->themePath, ThemeLoaderInterface::THEME_NAMESPACE);
42
    }
43
}
44