You are here

protected function ParserBase::prepareExpressions in Feeds extensible parsers 8

Prepares the expressions for parsing.

At this point we just remove empty expressions.

Return value

array A map of machine name to expression.

3 calls to ParserBase::prepareExpressions()
JmesPathLinesParser::parseItems in src/Feeds/Parser/JmesPathLinesParser.php
Performs the actual parsing.
JsonPathLinesParser::parseItems in src/Feeds/Parser/JsonPathLinesParser.php
Performs the actual parsing.
ParserBase::parseItems in src/Feeds/Parser/ParserBase.php
Performs the actual parsing.

File

src/Feeds/Parser/ParserBase.php, line 312

Class

ParserBase
The Feeds extensible parser.

Namespace

Drupal\feeds_ex\Feeds\Parser

Code

protected function prepareExpressions() {
  $expressions = [];
  foreach ($this->configuration['sources'] as $machine_name => $source) {
    if (strlen($source['value'])) {
      $expressions[$machine_name] = $source['value'];
    }
  }
  return $expressions;
}