Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function compile(\Twig_Compiler $compiler) |
||
24 | { |
||
25 | $compiler |
||
26 | ->addDebugInfo($this) |
||
27 | ->write('ob_start();' . PHP_EOL) |
||
28 | ->subcompile($this->getNode('body')) |
||
29 | ->write('$content = ob_get_clean();' . PHP_EOL) |
||
30 | ->write('preg_match("/^\s*/", $content, $matches);' . PHP_EOL) |
||
31 | ->write('$lines = explode("\n", $content);' . PHP_EOL) |
||
32 | ->write('$content = preg_replace(\'/^\' . $matches[0]. \'/\', "", $lines);' . PHP_EOL) |
||
33 | ->write('$content = join("\n", $content);' . PHP_EOL) |
||
34 | ->write('echo $this->env->getExtension(\'allejo\stakx\Templating\Twig\TwigExtension\')->parseMarkup($content, "' . $this->tag . '");' . PHP_EOL) |
||
35 | ; |
||
36 | } |
||
37 | } |
||
38 |