af_comics: pass PluginHost to filter constructors
This commit is contained in:
parent
d1ffe6d6cf
commit
dd30825b94
|
@ -3,6 +3,10 @@ abstract class Af_ComicFilter {
|
||||||
public abstract function supported();
|
public abstract function supported();
|
||||||
public abstract function process(&$article);
|
public abstract function process(&$article);
|
||||||
|
|
||||||
|
public function __construct(/*PluginHost $host*/) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function on_subscribe($url) {
|
public function on_subscribe($url) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Af_Comics extends Plugin {
|
||||||
|
|
||||||
array_push($names, $filter_name);
|
array_push($names, $filter_name);
|
||||||
|
|
||||||
$filter = new $filter_name();
|
$filter = new $filter_name($host);
|
||||||
|
|
||||||
if (is_subclass_of($filter, "Af_ComicFilter")) {
|
if (is_subclass_of($filter, "Af_ComicFilter")) {
|
||||||
array_push($this->filters, $filter);
|
array_push($this->filters, $filter);
|
||||||
|
|
Loading…
Reference in New Issue