af_comics: pass PluginHost to filter constructors

This commit is contained in:
Andrew Dolgov 2021-10-18 07:41:24 +03:00
parent d1ffe6d6cf
commit dd30825b94
2 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,10 @@ abstract class Af_ComicFilter {
public abstract function supported();
public abstract function process(&$article);
public function __construct(/*PluginHost $host*/) {
}
public function on_subscribe($url) {
return false;
}

View File

@ -34,7 +34,7 @@ class Af_Comics extends Plugin {
array_push($names, $filter_name);
$filter = new $filter_name();
$filter = new $filter_name($host);
if (is_subclass_of($filter, "Af_ComicFilter")) {
array_push($this->filters, $filter);