Passed
Pull Request — master (#53)
by Matthew
02:43
created

TemplateRenderService::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace PhpDraft\Domain\Services;
3
4
class TemplateRenderService {
5
  private $twig;
6
7
  public function __construct() {
8
    $loader = new \Twig_Loader_Filesystem(__DIR__ . '/../../EmailTemplates');
9
    $this->twig = new \Twig_Environment($loader);
10
  }
11
12
  public function RenderTemplate($emailTemplateFilename, $parameters) {
13
    return $this->twig->render($emailTemplateFilename, $parameters);
14
  }
15
}
16