[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 namespace phpbb\template\twig\node; 15 16 class php extends \Twig\Node\Node 17 { 18 /** @var \Twig\Environment */ 19 protected $environment; 20 21 public function __construct(\Twig\Node\TextNode $text, \phpbb\template\twig\environment $environment, $lineno, $tag = null) 22 { 23 $this->environment = $environment; 24 25 parent::__construct(array('text' => $text), array(), $lineno, $tag); 26 } 27 28 /** 29 * Compiles the node to PHP. 30 * 31 * @param \Twig\Compiler A Twig\Compiler instance 32 */ 33 public function compile(\Twig\Compiler $compiler) 34 { 35 $compiler->addDebugInfo($this); 36 37 $config = $this->environment->get_phpbb_config(); 38 39 if (!$config['tpl_allow_php']) 40 { 41 $compiler 42 ->write("// PHP Disabled\n") 43 ; 44 45 return; 46 } 47 48 $compiler 49 ->raw($this->getNode('text')->getAttribute('data')) 50 ; 51 } 52 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |