Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Compiler.php

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

Twig

Code

private function checkForEcho(string $string) : void {
    if ($this->didUseEcho) {
        return;
    }
    $this->didUseEcho = preg_match('/^\\s*+(echo|print)\\b/', $string, $m) ? $m[1] : false;
}
RSS feed
Powered by Drupal