BookStackApp_BookStack/app/Search/Options/SearchOption.php
Dan Brown 93c677a6a9
Searching: Added negation support to UI and term handling
Updated/added tests to cover.
Support for actual search queries still remains.
2024-10-03 15:59:50 +01:00

27 lines
541 B
PHP

<?php
namespace BookStack\Search\Options;
abstract class SearchOption
{
public function __construct(
public string $value,
public bool $negated = false,
) {
}
/**
* Get the key used for this option when used in a map.
* Null indicates to use the index of the containing array.
*/
public function getKey(): string|null
{
return null;
}
/**
* Get the search string representation for this search option.
*/
abstract public function toString(): string;
}