mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-24 16:06:48 +00:00
93c677a6a9
Updated/added tests to cover. Support for actual search queries still remains.
27 lines
541 B
PHP
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;
|
|
}
|