@@ 146-157 (lines=12) @@ | ||
143 | * |
|
144 | * @return array |
|
145 | */ |
|
146 | protected function initializeResources(Strategy $strategy, $filepath) |
|
147 | { |
|
148 | $resources = []; |
|
149 | $resourceConfiguration = $strategy->getResources(); |
|
150 | foreach ($resourceConfiguration as $resource => $configuration) { |
|
151 | $object = $this->objectManager->get($resource); |
|
152 | $object->start($strategy, $filepath); |
|
153 | $object->setConfiguration($configuration); |
|
154 | $resources[$resource] = $object; |
|
155 | } |
|
156 | return $resources; |
|
157 | } |
|
158 | ||
159 | /** |
|
160 | * @param \HDNET\Importr\Domain\Model\Import $import |
|
@@ 164-177 (lines=14) @@ | ||
161 | * |
|
162 | * @return array |
|
163 | */ |
|
164 | protected function initializeTargets(Import $import) |
|
165 | { |
|
166 | $targets = []; |
|
167 | $targetConfiguration = $import->getStrategy() |
|
168 | ->getTargets(); |
|
169 | foreach ($targetConfiguration as $target => $configuration) { |
|
170 | $object = $this->objectManager->get($target); |
|
171 | $object->setConfiguration($configuration); |
|
172 | $object->getConfiguration(); |
|
173 | $object->start($import->getStrategy()); |
|
174 | $targets[$target] = $object; |
|
175 | } |
|
176 | return $targets; |
|
177 | } |
|
178 | ||
179 | /** |
|
180 | * @param int $interval |