Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
This commit is contained in:
Benjamin Brahmer 2022-08-19 11:26:04 +02:00
parent 1784406fa7
commit 410a1e4d6b
1 changed files with 7 additions and 12 deletions

View File

@ -91,19 +91,14 @@ class OPMLExporter
{
$feedOutline = $document->createElement('outline');
$attributes = [
['title', $feed->getTitle()],
['text', $feed->getTitle()],
['type', 'rss'],
['xmlUrl', $feed->getUrl()],
['htmlUrl', $feed->getLink()],
'title' => $feed->getTitle(),
'text' => $feed->getTitle(),
'type' => 'rss',
'xmlUrl' => $feed->getUrl(),
'htmlUrl' => $feed->getLink(),
];
foreach ($attributes as $attribute) {
if (is_null($attribute[1])) {
$feedOutline->setAttribute($attribute[0], "");
} else {
$feedOutline->setAttribute($attribute[0], $attribute[1]);
}
foreach ($attributes as $name => $value) {
$feedOutline->setAttribute($name, $value ?? '');
}
return $feedOutline;