Rearrange structure

This commit is contained in:
Sobuno
2025-01-02 22:17:56 +01:00
parent 78f9f7e2dd
commit afc9ea08f3
9 changed files with 143 additions and 129 deletions

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;
/**
* Represents a word in the search query, meaning either a single-word without spaces or a quote-delimited string
*/
class Word extends Node
{
private string $value;
public function __construct(string $value, bool $prohibited = false)
{
$this->value = $value;
$this->prohibited = $prohibited;
}
public function getValue(): string
{
return $this->value;
}
public function __toString(): string
{
return ($this->prohibited ? '-' : '') . $this->value;
}
}