public function addConverters(array $converters) {
        foreach ($converters as $converter) {
            if (is_string($converter)) {
                $converter = new $converter();
            }

            if (!$converter instanceof OutputConverterInterface) {
                $name = is_object($converter) ? get_class($converter) : (string) $converter;
                throw new InvalidArgumentException('Given converter (' . $name . ') does not implement OutputConverterInterface', 500);
            }

            $this->registerConverter($converter);
        }

        return $this;
    }
public function addConverters(array $converters) {
        foreach ($converters as $converter) {
            if (is_string($converter)) {
                $converter = new $converter();
            }

            if (!$converter instanceof OutputConverterInterface) {
                $name = is_object($converter) ? get_class($converter) : (string) $converter;
                throw new InvalidArgumentException('Given converter (' . $name . ') does not implement OutputConverterInterface', 500);
            }

            $this->registerConverter($converter);
        }

        return $this;
    }
public function addConverters ( array $ converters ) { foreach ( $ converters as $ converter ) { if ( is_string ( $ converter ) ) { $ converter = new $ converter ( ) ; } if ( ! $ converter instanceof OutputConverterInterface ) { $ name = is_object ( $ converter ) ? get_class ( $ converter ) : ( string ) $ converter ; throw new InvalidArgumentException ( 'Given converter (' . $ name . ') does not implement OutputConverterInterface' , 500 ) ; } $ this -> registerConverter ( $ converter ) ; } return $ this ; }
Add a list of converters to the available output converters.

@param array $converters A list of objects or object names (strings) implementing `OutputConverterInterface`.
@return self
Add a list of converters to the available output converters .