function MailhandlerCommandsExtendedHeaders::getMappingSources in Mailhandler 6.2
Same name and namespace in other branches
- 7.2 modules/mailhandler_extended/plugins/mailhandler/commands/MailhandlerCommandsExtendedHeaders.class.php \MailhandlerCommandsExtendedHeaders::getMappingSources()
Return mapping sources in the same manner as a Feeds Parser.
Return value
Array containing mapping sources in standard Feeds Parser format.
Overrides MailhandlerCommandsHeaders::getMappingSources
File
- modules/
mailhandler_extended/ plugins/ mailhandler/ commands/ MailhandlerCommandsExtendedHeaders.class.php, line 21 - MailhandlerCommandsExtendedHeaders class.
Class
- MailhandlerCommandsExtendedHeaders
- @file MailhandlerCommandsExtendedHeaders class.
Code
function getMappingSources($config) {
$sources = array();
$extended_headers = explode("\n", $config['extended_headers']);
foreach ($extended_headers as $header) {
$header = trim($header);
$sources[$header] = array(
'name' => $header,
'description' => $header . ' (extended header)',
);
}
return $sources;
}