Пример #1
0
 /**
  * @param FeedEntity               $feed
  * @param ReaderInterface          $reader
  * @param EventDispatcherInterface $dispatcher
  * @param array                    $options
  *
  * @return Feed
  */
 protected function createFeed(FeedEntity $feed, ReaderInterface $reader, EventDispatcherInterface $dispatcher, array $options = [])
 {
     $builder = new FeedBuilder($dispatcher);
     $type = $this->importRegistry->getFeedType($feed->getType());
     $options = array_merge($options, $feed->getOptions());
     return $builder->build($type, $reader, $options);
 }
 /**
  * @param Feed $feed
  *
  * @return array
  */
 protected function getFeedTypeOptions(Feed $feed)
 {
     return array_merge(['forced' => true, 'feed' => $feed, 'default_values' => $feed->getDefaultValues()], $feed->getOptions());
 }