MediaWiki master
DummySearchIndexFieldDefinition.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Search;
4
11
17 public function getMapping( SearchEngine $engine ) {
18 $mapping = [
19 'name' => $this->name,
20 'type' => $this->type,
21 'flags' => $this->flags,
22 'subfields' => []
23 ];
24
25 foreach ( $this->subfields as $subfield ) {
26 $mapping['subfields'][] = $subfield->getMapping( $engine );
27 }
28
29 return $mapping;
30 }
31
32}
33
35class_alias( DummySearchIndexFieldDefinition::class, 'DummySearchIndexFieldDefinition' );
Dummy implementation of SearchIndexFieldDefinition for testing purposes.
Contain a class for special pages.
Basic infrastructure of the field definition.
string $type
Type of the field, one of the constants above.
Definition of a mapping for the search index field.