[solved] Plugin::$host is private

Why is $host in the Plugin class set to private? Then I cannot use it in my plugin class at all.

you know maybe you should consider posting less and reading more

start with sample plugins and maybe keep dumb questions here to a minimum in the future

Ok, I saw Plugin’s own init() method and thought that I should call that from my plugin class via parent::init($host). It sets the $host only readable for itself.

But as I saw you explain this is not desired here.

as far as i remember derivative plugins have their own variable because its not set in the constructor anyway so why even share it, idk

it could be set protected i guess and plugins could call parent init() in their own

But as I saw you explain this is not desired here.

i don’t mean stop posting altogether just maybe don’t do it over every little thing you could easily look up

No, I meant that the practise that I see as standard (call parent method of the same name if that implements functionality I need) seems not to be used here.

And keeping the plugin host in the plugin itself is something nearly every plugin does, which I thought is why the plugin base classes’ init() implements that. But that was contradicted by the private visibility of the plugin base classes’ $host variable.

Given that Plugin::$host is not used at all by the plugin base class itself, I thought it was meant to be used by child classes.

So what I think should be done: Either remove that Plugin::init() method and only define an abstract one with that name, or make the $dbh and $host variables in Plugin protected, so that child classes can use them.

I just saw that you did that at https://git.tt-rss.org/fox/tt-rss/commit/9e381bc2021dc427f62c463dac9cf7a82a66616f - thanks.