X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fsearch%2FSearchEngine.php;h=206067f0a73971892f11b7d960caa72b19395adb;hp=0bcb07a5a67fb759e5665bd685a07e21a274153c;hb=cc61a14751e4dff0d37212eb2d9e3300a7de4843;hpb=db525c78e66647d70319f5bee9a6bbf337b06fa0 diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 0bcb07a5a6..206067f0a7 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -109,6 +109,20 @@ abstract class SearchEngine { $this->features[$feature] = $data; } + /** + * Way to retrieve custom data set by setFeatureData + * or by the engine itself. + * @since 1.29 + * @param string $feature feature name + * @return mixed the feature value or null if unset + */ + public function getFeatureData( $feature ) { + if ( isset ( $this->features[$feature] ) ) { + return $this->features[$feature]; + } + return null; + } + /** * When overridden in derived class, performs database-specific conversions * on text to be used for searching or updating search index.