@@ 164-175 (lines=12) @@ | ||
161 | * |
|
162 | * @return array |
|
163 | */ |
|
164 | protected function initializeResources(Strategy $strategy, $filepath) |
|
165 | { |
|
166 | $resources = []; |
|
167 | $resourceConfiguration = $strategy->getResources(); |
|
168 | foreach ($resourceConfiguration as $resource => $configuration) { |
|
169 | $object = $this->objectManager->get($resource); |
|
170 | $object->start($strategy, $filepath); |
|
171 | $object->setConfiguration($configuration); |
|
172 | $resources[$resource] = $object; |
|
173 | } |
|
174 | return $resources; |
|
175 | } |
|
176 | ||
177 | /** |
|
178 | * @param \HDNET\Importr\Domain\Model\Import $import |
|
@@ 182-195 (lines=14) @@ | ||
179 | * |
|
180 | * @return array |
|
181 | */ |
|
182 | protected function initializeTargets(Import $import) |
|
183 | { |
|
184 | $targets = []; |
|
185 | $targetConfiguration = $import->getStrategy() |
|
186 | ->getTargets(); |
|
187 | foreach ($targetConfiguration as $target => $configuration) { |
|
188 | $object = $this->objectManager->get($target); |
|
189 | $object->setConfiguration($configuration); |
|
190 | $object->getConfiguration(); |
|
191 | $object->start($import->getStrategy()); |
|
192 | $targets[$target] = $object; |
|
193 | } |
|
194 | return $targets; |
|
195 | } |
|
196 | ||
197 | /** |
|
198 | * @param int $interval |