Skip to content
Snippets Groups Projects
Commit c01b6e43 authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

add pluginhost->get_array() shorthand

parent bf9033be
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment