Esempio n. 1
0
 /**
  * Process given document into template and render it with given values.
  *
  * @param DocumentInterface $document
  * @param array $values
  * @return Result
  */
 public function render(DocumentInterface $document, array $values)
 {
     // fill with values
     $xslt = new \XSLTProcessor();
     $template = $this->getTemplate($document);
     $xslt->importStylesheet($template);
     $content = $xslt->transformToDoc($this->createValuesDocument($values));
     Processor::undoEscapeXsl($content);
     return new Result($content, $document);
 }