MediaWiki REL1_41
SearchResultSetTrait.php File Reference

Go to the source code of this file.

Functions

 augmentResult (SearchResult $result)
 Returns extra data for specific result and store it in SearchResult object.
 
 getIterator ()
 
 getOffset ()
 
 setAugmentedData ( $name, $data)
 Sets augmented data for result set.
 

Variables

trait SearchResultSetTrait
 Trait useful for SearchResultSet implementations.
 

Function Documentation

◆ augmentResult()

augmentResult ( SearchResult $result)

Returns extra data for specific result and store it in SearchResult object.

Parameters
SearchResult$result

Definition at line 37 of file SearchResultSetTrait.php.

◆ getIterator()

getIterator ( )
final

Definition at line 57 of file SearchResultSetTrait.php.

◆ getOffset()

getOffset ( )
Returns
int|null The offset the current page starts at. Typically this should be null to allow the UI to decide on its own, but in special cases like interleaved AB tests specifying explicitly is necessary.

Definition at line 53 of file SearchResultSetTrait.php.

◆ setAugmentedData()

setAugmentedData ( $name,
$data )

Sets augmented data for result set.

Parameters
string$nameExtra data item name
array[]$dataExtra data as PAGEID => data

Definition at line 27 of file SearchResultSetTrait.php.