protected function getResponseFormat(array $config)
    {
        if (isset($config['responseFormat'])) {
            if (!is_string($config['responseFormat'])) {
                throw new \DomainException(
                    'responseFormat must reference a string',
                    self::ERR_INVALID_RESPONSEFORMAT
                );
            }
            return $config['responseFormat'];
        }
        return '[ %link% ] "%title%" by %author%'
            . '; Length %duration%'
            . '; Published %published%'
            . '; Views %views%'
            . '; Likes %likes%';
    }
protected function getResponseFormat(array $config)
    {
        if (isset($config['responseFormat'])) {
            if (!is_string($config['responseFormat'])) {
                throw new \DomainException(
                    'responseFormat must reference a string',
                    self::ERR_INVALID_RESPONSEFORMAT
                );
            }
            return $config['responseFormat'];
        }
        return '[ %link% ] "%title%" by %author%'
            . '; Length %duration%'
            . '; Published %published%'
            . '; Views %views%'
            . '; Likes %likes%';
    }
protected function getResponseFormat ( array $ config ) { if ( isset ( $ config [ 'responseFormat' ] ) ) { if ( ! is_string ( $ config [ 'responseFormat' ] ) ) { throw new \ DomainException ( 'responseFormat must reference a string' , self :: ERR_INVALID_RESPONSEFORMAT ) ; } return $ config [ 'responseFormat' ] ; } return '[ %link% ] "%title%" by %author%' . '; Length %duration%' . '; Published %published%' . '; Views %views%' . '; Likes %likes%' ; }
Extracts a pattern for formatting video data from configuration.

@param array $config
@return string
@throws \DomainException if format setting is invalid
Extracts a pattern for formatting video data from configuration .