src/CompositeConverterFactory.php
public function getMessageConvertersWithNames(array $converterNames) : HttpMessageConverter
    {
        $messageConverters = [];

        foreach ($converterNames as $converterName) {
            $converter = $this->getConverterWithName($converterName);

            if (!$converter) {
                throw ConfigurationException::create("No converter found with name {$converterName}");
            }

            $messageConverters[] = $converter;
        }

        if ($this->canUseDefaultConverter($converterNames)) {
            $messageConverters[] = StringMessageConverter::createWithoutConfigurationVariables();
        }

        return CompositeHttpMessageConverter::createWithConverters($messageConverters);
    }
public function getMessageConvertersWithNames(array $converterNames) : HttpMessageConverter
    {
        $messageConverters = [];

        foreach ($converterNames as $converterName) {
            $converter = $this->getConverterWithName($converterName);

            if (!$converter) {
                throw ConfigurationException::create("No converter found with name {$converterName}");
            }

            $messageConverters[] = $converter;
        }

        if ($this->canUseDefaultConverter($converterNames)) {
            $messageConverters[] = StringMessageConverter::createWithoutConfigurationVariables();
        }

        return CompositeHttpMessageConverter::createWithConverters($messageConverters);
    }
public function getMessageConvertersWithNames ( array $ converterNames ) : HttpMessageConverter { $ messageConverters = [ ] ; foreach ( $ converterNames as $ converterName ) { $ converter = $ this -> getConverterWithName ( $ converterName ) ; if ( ! $ converter ) { throw ConfigurationException :: create ( "No converter found with name {$converterName}" ) ; } $ messageConverters [ ] = $ converter ; } if ( $ this -> canUseDefaultConverter ( $ converterNames ) ) { $ messageConverters [ ] = StringMessageConverter :: createWithoutConfigurationVariables ( ) ; } return CompositeHttpMessageConverter :: createWithConverters ( $ messageConverters ) ; }
@param string[] $converterNames

@return HttpMessageConverter
@throws ConfigurationException
@throws \SimplyCodedSoftware\IntegrationMessaging\MessagingException
@param string [] $converterNames