Remove deprecated AbstractPlugin::__call()
Use AbstractPlugin::getPico() instead (e.g. `->getPico()->getConfig('my_config')` instead of `->getConfig('my_config')`).
This commit is contained in:
parent
9f596ac5b7
commit
efc4fb5288
1 changed files with 0 additions and 24 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue