protected function getFormatter(array $config)
    {
        if (isset($config['formatter'])) {
            if (!$config['formatter'] instanceof FormatterInterface) {
                throw new \DomainException(
                    'formatter must implement ' . __NAMESPACE__ . '\FormatterInterface',
                    self::ERR_FORMATTER_INVALID
                );
            }
            return $config['formatter'];
        }
        return new DefaultFormatter;
    }
protected function getFormatter(array $config)
    {
        if (isset($config['formatter'])) {
            if (!$config['formatter'] instanceof FormatterInterface) {
                throw new \DomainException(
                    'formatter must implement ' . __NAMESPACE__ . '\FormatterInterface',
                    self::ERR_FORMATTER_INVALID
                );
            }
            return $config['formatter'];
        }
        return new DefaultFormatter;
    }
protected function getFormatter ( array $ config ) { if ( isset ( $ config [ 'formatter' ] ) ) { if ( ! $ config [ 'formatter' ] instanceof FormatterInterface ) { throw new \ DomainException ( 'formatter must implement ' . __NAMESPACE__ . '\FormatterInterface' , self :: ERR_FORMATTER_INVALID ) ; } return $ config [ 'formatter' ] ; } return new DefaultFormatter ; }
Extracts the feed item formatter from configuration.

@param array $config
@return \Phergie\Irc\Plugin\React\FeedTicker\FormatterInterface
@throws \DomainException if formatter setting is invalid
Extracts the feed item formatter from configuration .