Total Complexity | 1 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
8 | abstract class VueCodeAbstractRenderer |
||
9 | { |
||
10 | /** |
||
11 | * @var VueCode |
||
12 | */ |
||
13 | protected $vueCode; |
||
14 | |||
15 | public function __construct(VueCode $vueCode) |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Generates the javascript code. |
||
22 | * |
||
23 | * @param Model $m |
||
24 | * @param HTMLNode[] $elements |
||
25 | * @return string |
||
26 | */ |
||
27 | abstract public function toScript(Model $m, array $elements); |
||
28 | |||
29 | /** |
||
30 | * Generates the javascript code. |
||
31 | * |
||
32 | * @param Model $m |
||
33 | * @param HTMLNode[] $elements |
||
34 | * @return string |
||
35 | */ |
||
36 | abstract public function toVariable(Model $m, array $elements); |
||
37 | |||
38 | /** |
||
39 | * Generates template data for rendering |
||
40 | * |
||
41 | * @param Model $m |
||
42 | * @param HTMLNode[] $elements $elements |
||
43 | * @return array |
||
44 | */ |
||
45 | abstract public function getTemplateData(Model $m, array $elements): array; |
||
46 | } |
||
47 |