src/View/Twig/TwigTranspiler.php
/**
	 * Prepares the string for the Twig compiler by compiling Horizon statements.
	 *
	 * @param string $value
	 * @param string $templateFileName
	 * @return string
	 */
Prepares the string for the Twig compiler by compiling Horizon statements.
Prepares the string for the Twig compiler by compiling Horizon statements .
public function precompile($value, $templateFileName = null) {
		$this->templateFileName = $templateFileName;
		$value = $this->correctWhitespace($value);
		$value = $this->compileTags($value);
		$value = $this->compileStatements($value);
		$value = $this->compileVariables($value);
		$translated = (new TwigTranslator())->compile($value, $this->translateNamespaces);
		if ($this->debugging) {
			$translated = str_replace('{', '&#!123;', $translated);
			$translated = str_replace('}', '&#!125;', $translated);
		}
		return ltrim($translated);
	}
public function precompile ( $ value , $ templateFileName = null ) { $ this -> templateFileName = $ templateFileName ; $ value = $ this -> correctWhitespace ( $ value ) ; $ value = $ this -> compileTags ( $ value ) ; $ value = $ this -> compileStatements ( $ value ) ; $ value = $ this -> compileVariables ( $ value ) ; $ translated = ( new TwigTranslator ( ) ) -> compile ( $ value , $ this -> translateNamespaces ) ; if ( $ this -> debugging ) { $ translated = str_replace ( '{' , '&#!123;' , $ translated ) ; $ translated = str_replace ( '}' , '&#!125;' , $ translated ) ; } return ltrim ( $ translated ) ; }
Prepares the string for the Twig compiler by compiling Horizon statements.
Prepares the string for the Twig compiler by compiling Horizon statements .