CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Maintenance\Set Class Reference

Simple set implementation so it's clear what the array is being used for when values are only stored as keys. More...

+ Inheritance diagram for CirrusSearch\Maintenance\Set:
+ Collaboration diagram for CirrusSearch\Maintenance\Set:

Public Member Functions

 __construct (array $elements=[])
 
 count ()
 
 add ( $element)
 
 addAll (array $elements)
 
 union (Set $other)
 
 contains ( $element)
 
 values ()
 

Detailed Description

Simple set implementation so it's clear what the array is being used for when values are only stored as keys.

Member Function Documentation

◆ add()

CirrusSearch\Maintenance\Set::add ( $element)
Parameters
string$elementElement to add to set
Returns
self

◆ addAll()

CirrusSearch\Maintenance\Set::addAll ( array $elements)
Parameters
string[]$elementsElements to add to set
Returns
self

◆ contains()

CirrusSearch\Maintenance\Set::contains ( $element)
Parameters
string$elementValue to test
Returns
bool True when the set contains $element

◆ count()

CirrusSearch\Maintenance\Set::count ( )
Returns
int Number of elements in the set

◆ union()

CirrusSearch\Maintenance\Set::union ( Set $other)
Parameters
Set$otherSet to union into this one
Returns
self

◆ values()

CirrusSearch\Maintenance\Set::values ( )
Returns
string[] Elements of the set

The documentation for this class was generated from the following file: