You are here

private function FeedsJSONPathParser::filterMappings in Feeds JSONPath Parser 6

Same name and namespace in other branches
  1. 7 FeedsJSONPathParser.inc \FeedsJSONPathParser::filterMappings()

Filters mappings, returning the ones that belong to us.

2 calls to FeedsJSONPathParser::filterMappings()
FeedsJSONPathParser::getMappingSources in ./FeedsJSONPathParser.inc
Override parent::getMappingSources().
FeedsJSONPathParser::parse in ./FeedsJSONPathParser.inc
Implementation of FeedsParser::parse().

File

./FeedsJSONPathParser.inc, line 287
Provides the Class for Feeds JSONPath Parser.

Class

FeedsJSONPathParser
Base class for the HTML and XML parsers.

Code

private function filterMappings($mappings) {
  $our_mappings = array();
  foreach ($mappings as $mapping) {
    if (strpos($mapping['source'], 'jsonpath_parser:') === 0) {
      $our_mappings[$mapping['source']] = $mapping['target'];
    }
  }
  return $our_mappings;
}