PluginProbe
WebTotem Security / 3.0.2
WebTotem Security v3.0.2
3.0.2 3.0.1 3.0.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.1 2.2.2 2.2.3 All 110 releases
wt-security / vendor / twig / twig / src / Node / Expression / ConditionalExpression.php

ConditionalExpression.php in WebTotem Security 3.0.2, at vendor/twig/twig/src/Node/Expression/ConditionalExpression.php

37 lines 922 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 * This file is part of Twig.
5 *
6 * (c) Fabien Potencier
7 * (c) Armin Ronacher
8 *
9 * For the full copyright and license information, please view the LICENSE
10 * file that was distributed with this source code.
11 */
12
13 namespace Twig\Node\Expression;
14
15 use Twig\Compiler;
16
17 class ConditionalExpression extends AbstractExpression
18 {
19 public function __construct(AbstractExpression $expr1, AbstractExpression $expr2, AbstractExpression $expr3, int $lineno)
20 {
21 parent::__construct(['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno);
22 }
23
24 public function compile(Compiler $compiler): void
25 {
26 $compiler
27 ->raw('((')
28 ->subcompile($this->getNode('expr1'))
29 ->raw(') ? (')
30 ->subcompile($this->getNode('expr2'))
31 ->raw(') : (')
32 ->subcompile($this->getNode('expr3'))
33 ->raw('))')
34 ;
35 }
36 }
37