Remove deprecated AbstractPlugin::__call()

Use AbstractPlugin::getPico() instead (e.g. `->getPico()->getConfig('my_config')` instead of `->getConfig('my_config')`).
This commit is contained in:
Daniel Rudolf 2020-04-11 23:21:20 +02:00
parent 9f596ac5b7
commit efc4fb5288
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538

View file

@ -195,30 +195,6 @@ abstract class AbstractPlugin implements PluginInterface
return isset($pluginConfig[$configName]) ? $pluginConfig[$configName] : $default;
}
/**
* Passes all not satisfiable method calls to Pico
*
* @see PluginInterface::getPico()
*
* @deprecated 2.1.0
*
* @param string $methodName name of the method to call
* @param array $params parameters to pass
*
* @return mixed return value of the called method
*/
public function __call($methodName, array $params)
{
if (method_exists($this->getPico(), $methodName)) {
return call_user_func_array([ $this->getPico(), $methodName ], $params);
}
throw new \BadMethodCallException(
'Call to undefined method ' . get_class($this->getPico()) . '::' . $methodName . '() '
. 'through ' . get_called_class() . '::__call()'
);
}
/**
* Enables all plugins which this plugin depends on
*