Translation/Exporter/ExporterCollector.php
public function getByFormat($format)
    {
        foreach ($this->getExporters() as $exporter) {
            if ($exporter->support($format)) {
                return $exporter;
            }
        }

        throw new \RuntimeException(sprintf('No exporter found for "%s" format.', $format));
    }
public function getByFormat($format)
    {
        foreach ($this->getExporters() as $exporter) {
            if ($exporter->support($format)) {
                return $exporter;
            }
        }

        throw new \RuntimeException(sprintf('No exporter found for "%s" format.', $format));
    }
public function getByFormat ( $ format ) { foreach ( $ this -> getExporters ( ) as $ exporter ) { if ( $ exporter -> support ( $ format ) ) { return $ exporter ; } } throw new \ RuntimeException ( sprintf ( 'No exporter found for "%s" format.' , $ format ) ) ; }
Returns an exporter that support the given format.

@param string $format
@return ExporterInterface
@throws \RuntimeException
Returns an exporter that support the given format .