2016-05-13 00:10:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Null index field - means search engine does not implement this field.
|
|
|
|
|
*/
|
|
|
|
|
class NullIndexField implements SearchIndexField {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get mapping for specific search engine
|
|
|
|
|
* @param SearchEngine $engine
|
|
|
|
|
* @return array|null Null means this field does not map to anything
|
|
|
|
|
*/
|
|
|
|
|
public function getMapping( SearchEngine $engine ) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set global flag for this field.
|
|
|
|
|
*
|
2017-08-11 21:45:25 +00:00
|
|
|
* @param int $flag Bit flag to set/unset
|
2016-05-13 00:10:52 +00:00
|
|
|
* @param bool $unset True if flag should be unset, false by default
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function setFlag( $flag, $unset = false ) {
|
2019-03-22 06:11:04 +00:00
|
|
|
return $this;
|
2016-05-13 00:10:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Check if flag is set.
|
2017-08-11 15:46:31 +00:00
|
|
|
* @param int $flag
|
2016-05-13 00:10:52 +00:00
|
|
|
* @return int 0 if unset, !=0 if set
|
|
|
|
|
*/
|
|
|
|
|
public function checkFlag( $flag ) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Merge two field definitions if possible.
|
|
|
|
|
*
|
|
|
|
|
* @param SearchIndexField $that
|
|
|
|
|
* @return SearchIndexField|false New definition or false if not mergeable.
|
|
|
|
|
*/
|
|
|
|
|
public function merge( SearchIndexField $that ) {
|
|
|
|
|
return $that;
|
|
|
|
|
}
|
2017-06-20 13:43:28 +00:00
|
|
|
|
|
|
|
|
/**
|
2017-08-11 14:49:52 +00:00
|
|
|
* @inheritDoc
|
2017-06-20 13:43:28 +00:00
|
|
|
*/
|
|
|
|
|
public function getEngineHints( SearchEngine $engine ) {
|
|
|
|
|
return [];
|
|
|
|
|
}
|
2016-05-13 00:10:52 +00:00
|
|
|
}
|