Remove deprecated AbstractPlugin::__call()

Use AbstractPlugin::getPico() instead (e.g. `->getPico()->getConfig('my_config')` instead of `->getConfig('my_config')`).
pico-3.0
Daniel Rudolf 5 years ago
parent 9f596ac5b7
commit efc4fb5288
No known key found for this signature in database
GPG Key ID: A061F02CD8DE4538
  1. 24
      lib/AbstractPlugin.php

@ -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…
Cancel
Save