1 | <?php |
||
13 | abstract class BaseWrapper |
||
14 | { |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $context; |
||
19 | |||
20 | /** |
||
21 | * @var Twig_Environment |
||
22 | */ |
||
23 | protected $environment; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $parameters; |
||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $mappings; |
||
33 | |||
34 | /** |
||
35 | * BaseWrapper constructor. |
||
36 | * |
||
37 | * @param array $context |
||
38 | * @param Twig_Environment $environment |
||
39 | */ |
||
40 | public function __construct(array $context, Twig_Environment $environment) |
||
48 | |||
49 | /** |
||
50 | * @return array |
||
51 | */ |
||
52 | public function getParameters(): array |
||
56 | |||
57 | /** |
||
58 | * @param array $parameters |
||
59 | */ |
||
60 | public function setParameters(array $parameters) |
||
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | public function getMappings(): array |
||
72 | |||
73 | /** |
||
74 | * @param array $mappings |
||
75 | */ |
||
76 | public function setMappings(array $mappings) |
||
80 | |||
81 | /** |
||
82 | * @return array |
||
83 | */ |
||
84 | protected function configureMappings(): array |
||
88 | |||
89 | /** |
||
90 | * Calls the matching mapping callable for each property. |
||
91 | * |
||
92 | * @param array $properties |
||
93 | * @param array|null $mappings |
||
94 | * @param string|null $column |
||
95 | * |
||
96 | * @throws RuntimeException |
||
97 | */ |
||
98 | protected function setProperties(array $properties, array $mappings = null, string $column = null) |
||
135 | } |
||
136 |