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