/** * Adds the assets of the template to the Assets manager. * * @param TemplateInterface $template * * @return void */ protected function addTemplateAssets($template) { /** @var SplFileInfo $file_info */ foreach ($template->getAssets() as $filename => $file_info) { $this->assets->set($filename, $file_info->getRelativePathname()); } }
/** * Retrieves a new instance of the converter necessary to convert the give input format to the given output format. * * @param string $input_format * @param string $output_format * * @throws Exception\ConverterNotFoundException * * @return ConverterInterface */ public function get($input_format, $output_format) { $definition = $this->definition_factory->get($input_format, $output_format); foreach ($this->converters as $class => $formats) { if (array($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 Exception\ConverterNotFoundException('No converter could be found to convert from ' . $input_format . ' to ' . $output_format); }