2025-01-02 22:17:56 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace FireflyIII\Support\Search\QueryParser;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a field operator with value (e.g. amount:100)
|
|
|
|
*/
|
2025-01-02 23:19:21 +01:00
|
|
|
class FieldNode extends Node
|
2025-01-02 22:17:56 +01:00
|
|
|
{
|
|
|
|
private string $operator;
|
|
|
|
private string $value;
|
|
|
|
|
|
|
|
public function __construct(string $operator, string $value, bool $prohibited = false)
|
|
|
|
{
|
|
|
|
$this->operator = $operator;
|
|
|
|
$this->value = $value;
|
|
|
|
$this->prohibited = $prohibited;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getOperator(): string
|
|
|
|
{
|
|
|
|
return $this->operator;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getValue(): string
|
|
|
|
{
|
|
|
|
return $this->value;
|
|
|
|
}
|
|
|
|
}
|