public function getParser(array $config = null)
	{
		$this->configOptimizer->reset();

		// Get the stylesheet used for rendering
		$xslt      = new XSLT;
		$xslt->optimizer->normalizer->remove('RemoveLivePreviewAttributes');
		$this->xsl = $xslt->getXSL($this->configurator->rendering);

		// Prepare the parser's config
		$this->config = (isset($config)) ? $config : $this->configurator->asConfig();
		$this->config = ConfigHelper::filterConfig($this->config, 'JS');
		$this->config = $this->callbackGenerator->replaceCallbacks($this->config);

		// Get the parser's source and inject its config
		$src = $this->getHints() . $this->injectConfig($this->getSource());

		// Export the public API
		$src .= "if (!window['s9e']) window['s9e'] = {};\n" . $this->getExports();

		// Minify the source
		$src = $this->getMinifier()->get($src);

		// Wrap the source in a function to protect the global scope
		$src = '(function(){' . $src . '})()';

		return $src;
	}
public function getParser(array $config = null)
	{
		$this->configOptimizer->reset();

		// Get the stylesheet used for rendering
		$xslt      = new XSLT;
		$xslt->optimizer->normalizer->remove('RemoveLivePreviewAttributes');
		$this->xsl = $xslt->getXSL($this->configurator->rendering);

		// Prepare the parser's config
		$this->config = (isset($config)) ? $config : $this->configurator->asConfig();
		$this->config = ConfigHelper::filterConfig($this->config, 'JS');
		$this->config = $this->callbackGenerator->replaceCallbacks($this->config);

		// Get the parser's source and inject its config
		$src = $this->getHints() . $this->injectConfig($this->getSource());

		// Export the public API
		$src .= "if (!window['s9e']) window['s9e'] = {};\n" . $this->getExports();

		// Minify the source
		$src = $this->getMinifier()->get($src);

		// Wrap the source in a function to protect the global scope
		$src = '(function(){' . $src . '})()';

		return $src;
	}
public function getParser ( array $ config = null ) { $ this -> configOptimizer -> reset ( ) ; // Get the stylesheet used for rendering $ xslt = new XSLT ; $ xslt -> optimizer -> normalizer -> remove ( 'RemoveLivePreviewAttributes' ) ; $ this -> xsl = $ xslt -> getXSL ( $ this -> configurator -> rendering ) ; // Prepare the parser's config $ this -> config = ( isset ( $ config ) ) ? $ config : $ this -> configurator -> asConfig ( ) ; $ this -> config = ConfigHelper :: filterConfig ( $ this -> config , 'JS' ) ; $ this -> config = $ this -> callbackGenerator -> replaceCallbacks ( $ this -> config ) ; // Get the parser's source and inject its config $ src = $ this -> getHints ( ) . $ this -> injectConfig ( $ this -> getSource ( ) ) ; // Export the public API $ src .= "if (!window['s9e']) window['s9e'] = {};\n" . $ this -> getExports ( ) ; // Minify the source $ src = $ this -> getMinifier ( ) -> get ( $ src ) ; // Wrap the source in a function to protect the global scope $ src = '(function(){' . $ src . '})()' ; return $ src ; }
Get a JavaScript parser

@param  array  $config Config array returned by the configurator
@return string         JavaScript parser
Get a JavaScript parser