1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:46:00 +00:00

add pluginhost->get_array() shorthand

This commit is contained in:
Andrew Dolgov
2021-02-26 15:33:59 +03:00
parent bf9033beb6
commit c01b6e43fd

View File

@@ -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) {
$idx = get_class($sender);