1 | <?php |
||
11 | abstract class ImportFileUnit extends AbstractUnit implements ImportFileUnitInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string|callable |
||
15 | */ |
||
16 | protected $isEntityCondition; |
||
17 | /** |
||
18 | * @var array|string[]|callable[] |
||
19 | */ |
||
20 | protected $contributions = []; |
||
21 | /** |
||
22 | * @var array|string[]|callable[] |
||
23 | */ |
||
24 | protected $writeConditions = []; |
||
25 | /** |
||
26 | * @var array|string[]|callable[] |
||
27 | */ |
||
28 | protected $validationRules = []; |
||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $mapping = []; |
||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $tmpFileName; |
||
37 | /** |
||
38 | * @var ResourceInterface |
||
39 | */ |
||
40 | protected $filesystem; |
||
41 | /** |
||
42 | * @var HashmapInterface[] |
||
43 | */ |
||
44 | protected $hashmaps; |
||
45 | |||
46 | 55 | public function __construct($code) |
|
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 29 | public function getMapping() |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 25 | public function setMapping(array $mapping) |
|
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | 6 | public function getIsEntityCondition() |
|
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | 20 | public function setIsEntityCondition($condition) |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc |
||
86 | */ |
||
87 | 8 | public function getContributions() |
|
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | 9 | public function addContribution($contribution) |
|
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | 13 | public function getWriteConditions() |
|
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | 5 | public function addWriteCondition($condition) |
|
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | 31 | public function getFilesystem() |
|
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | 21 | public function setFilesystem(ResourceInterface $filesystem) |
|
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | 31 | public function getTmpFileName() |
|
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | 29 | public function setTmpFileName($tmpFileName) |
|
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | */ |
||
151 | 8 | public function getValidationRules() |
|
155 | |||
156 | /** |
||
157 | * {@inheritdoc} |
||
158 | */ |
||
159 | 4 | public function addValidationRule($condition) |
|
163 | |||
164 | /** |
||
165 | * close IO if it was not closed |
||
166 | */ |
||
167 | 54 | public function __destruct() |
|
173 | |||
174 | /** |
||
175 | * {@inheritdoc} |
||
176 | */ |
||
177 | 8 | public function addHashmap(HashmapInterface $hashmap) |
|
181 | |||
182 | /** |
||
183 | * {@inheritdoc} |
||
184 | */ |
||
185 | 24 | public function getHashmaps() |
|
189 | } |
||
190 |