Пример #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->registry->getFeedType($feed->getType());
     $options = array_merge($options, $feed->getOptions());
     return $builder->build($type, $reader, $options);
 }
 /**
  * @param Feed $feed
  *
  * @return array
  */
 protected function getReaderTypeOptions(Feed $feed)
 {
     return array_merge(['partial' => $feed->isPartial(), 'forced' => true], $feed->getReaderOptions());
 }
 /**
  * Returns a unique hash for an origin and a feed
  *
  * @param  Feed   $feed
  * @return string
  */
 protected function getFeedHash(Feed $feed)
 {
     return md5($feed->getId());
 }