@@ 71-75 (lines=5) @@ | ||
68 | catch (CompilationException $e) { |
|
69 | } |
|
70 | $output = Compiler::PHP_OPEN . 'if($doCache) {' . "\n\t" . 'echo \'<dwoo:dynamic_\'.$dynamicId.\'>' . str_replace('\'', '\\\'', $content) . '</dwoo:dynamic_\'.$dynamicId.\'>\';' . "\n} else {\n\t"; |
|
71 | if (substr($content, 0, strlen(Compiler::PHP_OPEN)) == Compiler::PHP_OPEN) { |
|
72 | $output .= substr($content, strlen(Compiler::PHP_OPEN)); |
|
73 | } else { |
|
74 | $output .= Compiler::PHP_CLOSE . $content; |
|
75 | } |
|
76 | if (substr($output, - strlen(Compiler::PHP_CLOSE)) == Compiler::PHP_CLOSE) { |
|
77 | $output = substr($output, 0, - strlen(Compiler::PHP_CLOSE)); |
|
78 | } else { |
|
@@ 76-80 (lines=5) @@ | ||
73 | } else { |
|
74 | $output .= Compiler::PHP_CLOSE . $content; |
|
75 | } |
|
76 | if (substr($output, - strlen(Compiler::PHP_CLOSE)) == Compiler::PHP_CLOSE) { |
|
77 | $output = substr($output, 0, - strlen(Compiler::PHP_CLOSE)); |
|
78 | } else { |
|
79 | $output .= Compiler::PHP_OPEN; |
|
80 | } |
|
81 | $output .= "\n}" . Compiler::PHP_CLOSE; |
|
82 | ||
83 | return $output; |