| Conditions | 3 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function compile(\Twig_Compiler $compiler) |
||
| 16 | { |
||
| 17 | $compiler->addDebugInfo($this) |
||
| 18 | ->write("ob_start();\n") |
||
| 19 | ->write('$documentProperties = ') |
||
| 20 | ->subcompile($this->getNode('properties')) |
||
| 21 | ->raw(';'.PHP_EOL) |
||
| 22 | ->write(self::CODE_INSTANCE.' = new '.PhpSpreadsheetWrapper::class.'($context, $this->env);'.PHP_EOL) |
||
| 23 | ->write(self::CODE_INSTANCE.'->startDocument($documentProperties);'.PHP_EOL) |
||
| 24 | ->write('unset($documentProperties);'.PHP_EOL) |
||
| 25 | ->subcompile($this->getNode('body')) |
||
| 26 | ->addDebugInfo($this) |
||
| 27 | ->write("ob_end_clean();\n") |
||
| 28 | ->write(self::CODE_INSTANCE.'->endDocument('. |
||
| 29 | ($this->getAttribute('preCalculateFormulas') ? 'true' : 'false').', '. |
||
| 30 | ($this->getAttribute('diskCachingDirectory') ? '\''.$this->getAttribute('diskCachingDirectory').'\'' : 'null').');'.PHP_EOL) |
||
| 31 | ->write('unset('.self::CODE_INSTANCE.');'.PHP_EOL); |
||
| 32 | } |
||
| 33 | |||
| 42 |