composer update
This commit is contained in:
parent
0b3c362c5e
commit
a1f0701630
142 changed files with 4530 additions and 1195 deletions
34
public/kirby/src/Query/AST/ComparisonNode.php
Normal file
34
public/kirby/src/Query/AST/ComparisonNode.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace Kirby\Query\AST;
|
||||
|
||||
use Kirby\Query\Visitors\Visitor;
|
||||
|
||||
/**
|
||||
* Represents a comparison operation between two values in the AST
|
||||
*
|
||||
* @package Kirby Query
|
||||
* @author Nico Hoffmann <nico@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
* @since 5.1.0
|
||||
* @unstable
|
||||
*/
|
||||
class ComparisonNode extends Node
|
||||
{
|
||||
public function __construct(
|
||||
public Node $left,
|
||||
public string $operator,
|
||||
public Node $right
|
||||
) {
|
||||
}
|
||||
|
||||
public function resolve(Visitor $visitor): bool|string
|
||||
{
|
||||
return $visitor->comparison(
|
||||
left: $this->left->resolve($visitor),
|
||||
operator: $this->operator,
|
||||
right: $this->right->resolve($visitor)
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue