Example #1
0
 /**
  * Set entry attributes
  *
  * @param Newscoop\Entity\Ingest\Feed\Entry $entry
  * @param Newscoop\Ingest\Parser $parser
  */
 private static function setAttributes(self $entry, Parser $parser)
 {
     $entry->setAttribute('service', (string) $parser->getService());
     $entry->setAttribute('language', (string) $parser->getLanguage());
     $entry->setAttribute('subject', (string) $parser->getSubject());
     $entry->setAttribute('country', (string) $parser->getCountry());
     $entry->setAttribute('product', (string) $parser->getProduct());
     $entry->setAttribute('subtitle', (string) $parser->getSubtitle());
     $entry->setAttribute('provider_id', (string) $parser->getProviderId());
     $entry->setAttribute('revision_id', (string) $parser->getRevisionId());
     $entry->setAttribute('location', (string) $parser->getLocation());
     $entry->setAttribute('provider', (string) $parser->getProvider());
     $entry->setAttribute('source', (string) $parser->getSource());
     $entry->setAttribute('catch_line', (string) $parser->getCatchLine());
     $entry->setAttribute('catch_word', (string) $parser->getCatchWord());
     $entry->setAttribute('authors', (string) $parser->getAuthors());
 }