1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-06-25 04:12:33 +02:00

[Various] getKey replacements and docu (#3283)

* [Various] getKey replacements and docu

* more bridges and fix to the abstract

* linting

* revert bandcampdaily. doing more than i thought
This commit is contained in:
Bocki
2023-03-06 20:01:51 +01:00
committed by GitHub
parent b40714079f
commit f0e5ef0fc5
16 changed files with 57 additions and 100 deletions

View File

@ -306,8 +306,16 @@ abstract class BridgeAbstract implements BridgeInterface
if (!isset($this->inputs[$this->queriedContext][$input]['value'])) {
return null;
}
if (array_key_exists('global', static::PARAMETERS)) {
if (array_key_exists($input, static::PARAMETERS['global'])) {
$context = 'global';
}
}
if (!isset($context)) {
$context = $this->queriedContext;
}
$needle = $this->inputs[$this->queriedContext][$input]['value'];
foreach (static::PARAMETERS[$this->queriedContext][$input]['values'] as $first_level_key => $first_level_value) {
foreach (static::PARAMETERS[$context][$input]['values'] as $first_level_key => $first_level_value) {
if ($needle === (string)$first_level_value) {
return $first_level_key;
} elseif (is_array($first_level_value)) {