1 | <?php |
||
8 | abstract class BaseWrapper |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | protected $context; |
||
14 | |||
15 | /** |
||
16 | * @var \Twig_Environment |
||
17 | */ |
||
18 | protected $environment; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $parameters; |
||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $mappings; |
||
28 | |||
29 | /** |
||
30 | * BaseWrapper constructor. |
||
31 | * |
||
32 | * @param array $context |
||
33 | * @param \Twig_Environment $environment |
||
34 | */ |
||
35 | 112 | public function __construct(array $context, \Twig_Environment $environment) |
|
43 | |||
44 | /** |
||
45 | * @return array |
||
46 | */ |
||
47 | 1 | public function getParameters(): array |
|
51 | |||
52 | /** |
||
53 | * @param array $parameters |
||
54 | */ |
||
55 | 1 | public function setParameters(array $parameters) |
|
59 | |||
60 | /** |
||
61 | * @return array |
||
62 | */ |
||
63 | public function getMappings(): array |
||
67 | |||
68 | /** |
||
69 | * @param array $mappings |
||
70 | */ |
||
71 | public function setMappings(array $mappings) |
||
75 | |||
76 | /** |
||
77 | * @return array |
||
78 | */ |
||
79 | 112 | protected function configureMappings(): array |
|
83 | |||
84 | /** |
||
85 | * Calls the matching mapping callable for each property. |
||
86 | * |
||
87 | * @param array $properties |
||
88 | * @param array|null $mappings |
||
89 | * @param string|null $column |
||
90 | * |
||
91 | * @throws \RuntimeException |
||
92 | */ |
||
93 | 112 | protected function setProperties(array $properties, array $mappings = null, string $column = null) |
|
130 | } |
||
131 |