예제 #1
0
 /**
  * Converts the given $source using the formats that belong to this
  * converter.
  *
  * This method will return null unless the 'scrybe://result' is used.
  *
  * @param Collection        $source      Collection of input files.
  * @param TemplateInterface $template Template used to decorate the
  *     output with.
  *
  * @return string[]|null
  */
 public function convert(Collection $source, TemplateInterface $template)
 {
     $this->fileset = $source;
     $this->assets->setProjectRoot($this->fileset->getProjectRoot());
     $template->setExtension(current($this->definition->getOutputFormat()->getExtensions()));
     $this->configure();
     $this->discover();
     $this->addTemplateAssets($template);
     $this->setOption('toc', $this->toc);
     return $this->create($template);
 }