| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function compile($compiler) |
||
| 30 | { |
||
| 31 | $compiler |
||
| 32 | ->addDebugInfo($this) |
||
| 33 | ->write('$_templateTimer = microtime(true)') |
||
| 34 | ->raw(";\n") |
||
| 35 | ->write('$_templateName = ') |
||
| 36 | ->subcompile($this->getNode('templateName')) |
||
| 37 | ->raw(";\n") |
||
| 38 | ->write('echo PHP_EOL."<!-- >>> TEMPLATE BEGIN >>> ".$_templateName." -->".PHP_EOL') |
||
| 39 | ->raw(";\n"); |
||
| 40 | // Make sure there is a body node |
||
| 41 | if (!empty($this->nodes['body'])) { |
||
| 42 | $compiler |
||
| 43 | ->indent() |
||
| 44 | ->subcompile($this->getNode('body')) |
||
| 45 | ->outdent(); |
||
| 46 | } |
||
| 47 | $compiler |
||
| 48 | ->write('echo PHP_EOL."<!-- <<< TEMPLATE END <<< FROM ".$_templateName." TIME ".number_format((microtime(true)-$_templateTimer)*1000,2)."ms -->".PHP_EOL') |
||
| 49 | ->raw(";\n") |
||
| 50 | ->write("unset(\$_templateName);\n") |
||
| 51 | ->write("unset(\$_templateTimer);\n"); |
||
| 52 | } |
||
| 54 |