Merge "Update docs/hooks.txt for ShowSearchHitTitle"
[mediawiki.git] / includes / search / DummySearchIndexFieldDefinition.php
blob3ee3ed5ad0335945908fc5a332f7907f34452333
1 <?php
3 /**
4 * Dummy implementation of SearchIndexFieldDefinition for testing purposes.
6 * @since 1.28
7 */
8 class DummySearchIndexFieldDefinition extends SearchIndexFieldDefinition {
10 /**
11 * @param SearchEngine $engine
13 * @return array
15 public function getMapping( SearchEngine $engine ) {
16 $mapping = [
17 'name' => $this->name,
18 'type' => $this->type,
19 'flags' => $this->flags,
20 'subfields' => []
23 foreach ( $this->subfields as $subfield ) {
24 $mapping['subfields'][] = $subfield->getMapping( $engine );
27 return $mapping;