Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
TemplateModifierBase | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
modifierBodyImpl | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
getModifierName | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
modifierBody | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Mvc\Template\Plugin; |
6 | |
7 | use PeServer\Core\Mvc\Template\Plugin\TemplatePluginArgument; |
8 | |
9 | abstract class TemplateModifierBase extends TemplatePluginBase implements ITemplateModifier |
10 | { |
11 | protected function __construct(TemplatePluginArgument $argument) |
12 | { |
13 | parent::__construct($argument); |
14 | } |
15 | |
16 | #region function |
17 | |
18 | abstract protected function modifierBodyImpl(mixed $value, mixed ...$params): mixed; |
19 | |
20 | #region ITemplateModifier |
21 | |
22 | abstract public function getModifierName(): string; |
23 | |
24 | public function modifierBody(mixed $value, mixed ...$params): mixed |
25 | { |
26 | return $this->modifierBodyImpl($value, $params); |
27 | } |
28 | |
29 | #endregion |
30 | } |