protected function ParserBase::parseItems in Feeds extensible parsers 8
Performs the actual parsing.
Parameters
\Drupal\feeds\FeedInterface $feed: The feed source.
\Drupal\feeds\Result\FetcherResultInterface $fetcher_result: The fetcher result.
\Drupal\feeds\Result\ParserResultInterface $result: The parser result object to populate.
\Drupal\feeds\StateInterface $state: The state object.
1 call to ParserBase::parseItems()
- ParserBase::parse in src/
Feeds/ Parser/ ParserBase.php - Parses content returned by fetcher.
2 methods override ParserBase::parseItems()
- JmesPathLinesParser::parseItems in src/
Feeds/ Parser/ JmesPathLinesParser.php - Performs the actual parsing.
- JsonPathLinesParser::parseItems in src/
Feeds/ Parser/ JsonPathLinesParser.php - Performs the actual parsing.
File
- src/
Feeds/ Parser/ ParserBase.php, line 293
Class
- ParserBase
- The Feeds extensible parser.
Namespace
Drupal\feeds_ex\Feeds\ParserCode
protected function parseItems(FeedInterface $feed, FetcherResultInterface $fetcher_result, ParserResultInterface $result, StateInterface $state) {
$expressions = $this
->prepareExpressions();
$variable_map = $this
->prepareVariables($expressions);
foreach ($this
->executeContext($feed, $fetcher_result, $state) as $row) {
if ($item = $this
->executeSources($row, $expressions, $variable_map)) {
$result
->addItem($item);
}
}
}