| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function getXml(): string |
||
| 42 | { |
||
| 43 | $template = file_get_contents(__DIR__ . '/templates/feed.xml'); |
||
| 44 | $template = str_replace('{{channelMeta}}', $this->config->getXml(), $template); |
||
| 45 | $itemsXml = ''; |
||
| 46 | |||
| 47 | foreach ($this->items as $item) { |
||
| 48 | $itemsXml .= $item->getXml() . "\n"; |
||
| 49 | } |
||
| 50 | |||
| 51 | $template = str_replace('{{items}}', $itemsXml, $template); |
||
| 52 | |||
| 53 | return $template; |
||
| 54 | } |
||
| 55 | } |