Exemple #1
0
 public function getParser(array $config = \null)
 {
     $this->configOptimizer->reset();
     $rendererGenerator = new XSLT();
     $this->xsl = $rendererGenerator->getXSL($this->configurator->rendering);
     $this->config = isset($config) ? $config : $this->configurator->asConfig();
     ConfigHelper::filterVariants($this->config, 'JS');
     $this->config = $this->callbackGenerator->replaceCallbacks($this->config);
     $src = $this->getHints() . $this->injectConfig($this->getSource());
     $src .= $this->getExports();
     $src = $this->getMinifier()->get($src);
     $src = '(function(){' . $src . '})()';
     return $src;
 }
Exemple #2
0
 /**
  * @testdox Returns an instance of Renderer
  */
 public function testInstance()
 {
     $generator = new XSLT();
     $this->assertInstanceOf('s9e\\TextFormatter\\Renderer', $generator->getRenderer($this->configurator->rendering));
 }