Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
TemplateFactory | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
createTemplate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Mvc\Template; |
6 | |
7 | use PeServer\Core\DI\DiFactoryBase; |
8 | use PeServer\Core\DI\DiFactoryTrait; |
9 | use PeServer\Core\DI\IDiContainer; |
10 | use PeServer\Core\Mvc\Template\SmartyTemplate; |
11 | use PeServer\Core\Mvc\Template\TemplateBase; |
12 | use PeServer\Core\Mvc\Template\TemplateOptions; |
13 | |
14 | class TemplateFactory extends DiFactoryBase implements ITemplateFactory |
15 | { |
16 | use DiFactoryTrait; |
17 | |
18 | #region ITemplateFactory |
19 | |
20 | public function createTemplate(TemplateOptions $options): TemplateBase |
21 | { |
22 | return $this->container->new(SmartyTemplate::class, [TemplateOptions::class => $options]); |
23 | } |
24 | |
25 | #endregion |
26 | } |