function Compiler::checkForEcho
2 calls to Compiler::checkForEcho()
- Compiler::raw in vendor/
twig/ twig/ src/ Compiler.php - Adds a raw string to the compiled code.
- Compiler::write in vendor/
twig/ twig/ src/ Compiler.php - Writes a string to the compiled code by adding indentation.
File
-
vendor/
twig/ twig/ src/ Compiler.php, line 249
Class
- Compiler
- @author Fabien Potencier <fabien@symfony.com>
Namespace
TwigCode
private function checkForEcho(string $string) : void {
if ($this->didUseEcho) {
return;
}
$this->didUseEcho = preg_match('/^\\s*+(echo|print)\\b/', $string, $m) ? $m[1] : false;
}