protected function getFilter(array $config)
    {
        if (!isset($config['filter']) || !$config['filter'] instanceof FilterInterface) {
            throw new \RuntimeException(
                'Configuration must contain a "filter" key referencing an object'
                    . ' implementing \Phergie\Irc\Plugin\EventFilter\FilterInterface',
                self::ERR_FILTER_INVALID
            );
        }

        return $config['filter'];
    }