public function get(string $input_format, string $output_format): ConverterInterface
    {
        $definition = $this->definition_factory->get($input_format, $output_format);

        foreach ($this->converters as $class => $formats) {
            if ([$input_format, $output_format] === $formats) {
                $assets = new Metadata\Assets();
                $assets->setLogger($this->logger);

                $toc = new Metadata\TableOfContents();
                $glossary = new Metadata\Glossary();

                /** @var ConverterInterface $converter */
                $converter = new $class($definition, $assets, $toc, $glossary);
                $converter->setLogger($this->logger);

                return $converter;
            }
        }

        throw new ConverterNotFoundException(
            'No converter could be found to convert from ' . $input_format . ' to ' . $output_format
        );
    }
public function get(string $input_format, string $output_format): ConverterInterface
    {
        $definition = $this->definition_factory->get($input_format, $output_format);

        foreach ($this->converters as $class => $formats) {
            if ([$input_format, $output_format] === $formats) {
                $assets = new Metadata\Assets();
                $assets->setLogger($this->logger);

                $toc = new Metadata\TableOfContents();
                $glossary = new Metadata\Glossary();

                /** @var ConverterInterface $converter */
                $converter = new $class($definition, $assets, $toc, $glossary);
                $converter->setLogger($this->logger);

                return $converter;
            }
        }

        throw new ConverterNotFoundException(
            'No converter could be found to convert from ' . $input_format . ' to ' . $output_format
        );
    }
public function get ( string $ input_format , string $ output_format ) : ConverterInterface { $ definition = $ this -> definition_factory -> get ( $ input_format , $ output_format ) ; foreach ( $ this -> converters as $ class => $ formats ) { if ( [ $ input_format , $ output_format ] === $ formats ) { $ assets = new Metadata \ Assets ( ) ; $ assets -> setLogger ( $ this -> logger ) ; $ toc = new Metadata \ TableOfContents ( ) ; $ glossary = new Metadata \ Glossary ( ) ; /** @var ConverterInterface $converter */ $ converter = new $ class ( $ definition , $ assets , $ toc , $ glossary ) ; $ converter -> setLogger ( $ this -> logger ) ; return $ converter ; } } throw new ConverterNotFoundException ( 'No converter could be found to convert from ' . $ input_format . ' to ' . $ output_format ) ; }
Retrieves a new instance of the converter necessary to convert the give input format to the given output format.

@throws ConverterNotFoundException
Retrieves a new instance of the converter necessary to convert the give input format to the given output format .