wiki.techinc.nl/includes/search/DummySearchIndexFieldDefinition.php
Erik Bernhardson 41f9c933b3 Fix two instances of calling function with too few args
At one point SearchIndexFieldDefinition was updated to require the
engine to be passed in, but it seems that update was missed here.

BackupDumper::loadPlugin() requires the second argument, set it to
the empty string to keep current behaviour.

Change-Id: Ifbd8fc4870ff63b2d338f8bb4d251d7a3477b989
2016-12-15 13:24:40 -08:00

30 lines
564 B
PHP

<?php
/**
* Dummy implementation of SearchIndexFieldDefinition for testing purposes.
*
* @since 1.28
*/
class DummySearchIndexFieldDefinition extends SearchIndexFieldDefinition {
/**
* @param SearchEngine $engine
*
* @return array
*/
public function getMapping( SearchEngine $engine ) {
$mapping = [
'name' => $this->name,
'type' => $this->type,
'flags' => $this->flags,
'subfields' => []
];
foreach ( $this->subfields as $subfield ) {
$mapping['subfields'][] = $subfield->getMapping( $engine );
}
return $mapping;
}
}