protected function FeedsXPathParserBase::filterMappings in Feeds XPath Parser 7
Same name and namespace in other branches
- 6 FeedsXPathParserBase.inc \FeedsXPathParserBase::filterMappings()
Filters mappings, returning the ones that belong to us.
Parameters
array $mappings: A mapping array from a processor.
Return value
array An array of mappings keyed source => target.
1 call to FeedsXPathParserBase::filterMappings()
- FeedsXPathParserBase::getOwnMappings in ./
FeedsXPathParserBase.inc - Gets the mappings that are defined by this parser.
File
- ./
FeedsXPathParserBase.inc, line 539 - Provides the base class for FeedsXPathParserHTML and FeedsXPathParserXML.
Class
- FeedsXPathParserBase
- Base class for the HTML and XML parsers.
Code
protected function filterMappings(array $mappings) {
$our_mappings = array();
foreach ($mappings as $mapping) {
if (strpos($mapping['source'], 'xpathparser:') === 0) {
$our_mappings[$mapping['source']] = $mapping['target'];
}
}
return $our_mappings;
}