Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace CirrusSearch\Query; |
| 4 | |
| 5 | use CirrusSearch\Search\SearchContext; |
| 6 | |
| 7 | /** |
| 8 | * Legacy keyword markup interface for keywords |
| 9 | * that still work by manipulating the SearchContext |
| 10 | */ |
| 11 | interface LegacyKeywordFeature { |
| 12 | |
| 13 | /** |
| 14 | * Fully featured apply method which delegates to doApply by default. |
| 15 | * |
| 16 | * @param SearchContext $context |
| 17 | * @param string $key The keyword |
| 18 | * @param string $value The value attached to the keyword with quotes stripped and escaped |
| 19 | * quotes un-escaped. |
| 20 | * @param string $quotedValue The original value in the search string, including quotes if used |
| 21 | * @param bool $negated Is the search negated? Not used to generate the returned AbstractQuery, |
| 22 | * that will be negated as necessary. Used for any other building/context necessary. |
| 23 | * @param string $delimiter the delimiter char used to wrap the keyword value ('"' in intitle:"test") |
| 24 | * @param string $suffix the optional suffix used after the value ('i' in insource:/regex/i) |
| 25 | * @return array Two element array, first an AbstractQuery or null to apply to the |
| 26 | * query. Second a boolean indicating if the quotedValue should be kept in the search |
| 27 | * string. |
| 28 | */ |
| 29 | public function doApplyExtended( SearchContext $context, $key, $value, $quotedValue, $negated, $delimiter, $suffix ); |
| 30 | } |