mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-15 15:44:03 +08:00
14 lines
324 B
PHP
14 lines
324 B
PHP
|
<?php
|
||
|
|
||
|
namespace BookStack\Search\Options;
|
||
|
|
||
|
class ExactSearchOption extends SearchOption
|
||
|
{
|
||
|
public function toString(): string
|
||
|
{
|
||
|
$escaped = str_replace('\\', '\\\\', $this->value);
|
||
|
$escaped = str_replace('"', '\"', $escaped);
|
||
|
return ($this->negated ? '-' : '') . '"' . $escaped . '"';
|
||
|
}
|
||
|
}
|