mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 10:56:01 +00:00
add pluginhost->get_array() shorthand
This commit is contained in:
@@ -514,6 +514,14 @@ class PluginHost {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_array(Plugin $sender, string $name, array $default_value = []) {
|
||||||
|
$tmp = $this->get($sender, $name);
|
||||||
|
|
||||||
|
if (!is_array($tmp)) $tmp = $default_value;
|
||||||
|
|
||||||
|
return $tmp;
|
||||||
|
}
|
||||||
|
|
||||||
function get_all($sender) {
|
function get_all($sender) {
|
||||||
$idx = get_class($sender);
|
$idx = get_class($sender);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user