mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 07:08:19 +00:00
Renaming of classes, making true recursive structure
This commit is contained in:
29
app/Support/Search/QueryParser/StringNode.php
Normal file
29
app/Support/Search/QueryParser/StringNode.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Search\QueryParser;
|
||||
|
||||
/**
|
||||
* Represents a string in the search query, meaning either a single-word without spaces or a quote-delimited string
|
||||
*/
|
||||
class StringNode 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user