mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-18 01:35:00 +02:00
refactor: introduce http Request object (#3926)
This commit is contained in:
parent
9574c17ddc
commit
d08d13f2c8
19 changed files with 125 additions and 94 deletions
|
@ -12,20 +12,21 @@ class HtmlFormat extends FormatAbstract
|
|||
$formatFactory = new FormatFactory();
|
||||
$buttons = [];
|
||||
$linkTags = [];
|
||||
foreach ($formatFactory->getFormatNames() as $format) {
|
||||
foreach ($formatFactory->getFormatNames() as $formatName) {
|
||||
// Dynamically build buttons for all formats (except HTML)
|
||||
if ($format === 'Html') {
|
||||
if ($formatName === 'Html') {
|
||||
continue;
|
||||
}
|
||||
$formatUrl = '?' . str_ireplace('format=Html', 'format=' . $format, htmlentities($queryString));
|
||||
$formatUrl = '?' . str_ireplace('format=Html', 'format=' . $formatName, htmlentities($queryString));
|
||||
$buttons[] = [
|
||||
'href' => $formatUrl,
|
||||
'value' => $format,
|
||||
'value' => $formatName,
|
||||
];
|
||||
$format = $formatFactory->create($formatName);
|
||||
$linkTags[] = [
|
||||
'href' => $formatUrl,
|
||||
'title' => $format,
|
||||
'type' => $formatFactory->create($format)->getMimeType(),
|
||||
'title' => $formatName,
|
||||
'type' => $format->getMimeType(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue