Bump and prep 1.34.1
[lhc/web/wiklou.git] / includes / search / NullIndexField.php
1 <?php
2
3 /**
4 * Null index field - means search engine does not implement this field.
5 */
6 class NullIndexField implements SearchIndexField {
7
8 /**
9 * Get mapping for specific search engine
10 * @param SearchEngine $engine
11 * @return array|null Null means this field does not map to anything
12 */
13 public function getMapping( SearchEngine $engine ) {
14 return null;
15 }
16
17 /**
18 * Set global flag for this field.
19 *
20 * @param int $flag Bit flag to set/unset
21 * @param bool $unset True if flag should be unset, false by default
22 * @return $this
23 */
24 public function setFlag( $flag, $unset = false ) {
25 return $this;
26 }
27
28 /**
29 * Check if flag is set.
30 * @param int $flag
31 * @return int 0 if unset, !=0 if set
32 */
33 public function checkFlag( $flag ) {
34 return 0;
35 }
36
37 /**
38 * Merge two field definitions if possible.
39 *
40 * @param SearchIndexField $that
41 * @return SearchIndexField|false New definition or false if not mergeable.
42 */
43 public function merge( SearchIndexField $that ) {
44 return $that;
45 }
46
47 /**
48 * @inheritDoc
49 */
50 public function getEngineHints( SearchEngine $engine ) {
51 return [];
52 }
53 }