protected function getPluginProcessors(array $config)
{
$processors = isset($config['pluginProcessors']) ? $config['pluginProcessors'] : $this->getDefaultPluginProcessors();
if (!is_array($processors)) {
throw new \RuntimeException('Configuration "pluginProcessors" key must reference an array');
}
if (!empty($processors)) {
$invalid = array_filter($processors, function ($processor) {
return !$processor instanceof PluginProcessorInterface;
});
if (!empty($invalid)) {
throw new \RuntimeException('All configuration "pluginProcessors" array values must implement' . ' \\Phergie\\Irc\\Bot\\React\\PluginProcessor\\PluginProcessorInterface');
}
}
return $processors;
}