Merge "Special:Upload should not crash on failing previews"
[mediawiki.git] / includes / search / NullIndexField.php
blob933e0ad3328e8bc58cdcbe2188e69a3024dba86b
1 <?php
3 /**
4 * Null index field - means search engine does not implement this field.
5 */
6 class NullIndexField implements SearchIndexField {
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
13 public function getMapping( SearchEngine $engine ) {
14 return null;
17 /**
18 * Set global flag for this field.
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
24 public function setFlag( $flag, $unset = false ) {
27 /**
28 * Check if flag is set.
29 * @param $flag
30 * @return int 0 if unset, !=0 if set
32 public function checkFlag( $flag ) {
33 return 0;
36 /**
37 * Merge two field definitions if possible.
39 * @param SearchIndexField $that
40 * @return SearchIndexField|false New definition or false if not mergeable.
42 public function merge( SearchIndexField $that ) {
43 return $that;