Phergie\Irc\Bot\React\Bot::getPluginProcessors PHP Method

getPluginProcessors() protected method

Returns a list of processors for plugins.
protected getPluginProcessors ( array $config )
$config array Associative array keyed by setting name
    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;
    }