Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Formatters\Reference\ByCertainPropertyIdGrouper Class Reference

A list of snaks, grouped by a certain set of properties, with all snaks of other properties in one “other” group. More...

Public Member Functions

 getByPropertyId (?PropertyId $certainPropertyId)
 
 getOthers ()
 

Private Attributes

 $groups = []
 
 $otherGroup = []
 
 $hasUnknownPropertyId = false
 

Detailed Description

A list of snaks, grouped by a certain set of properties, with all snaks of other properties in one “other” group.

For convenience, properties can be specified as null (not known). Snaks are never grouped by such properties, and getting the snaks for them simply returns an empty array.

Member Function Documentation

◆ getByPropertyId()

Wikibase\Lib\Formatters\Reference\ByCertainPropertyIdGrouper::getByPropertyId ( ?PropertyId $certainPropertyId)
Exceptions
InvalidArgumentExceptionif the property ID is not one of the ones given in the constructor
Returns
Snak[]

◆ getOthers()

Wikibase\Lib\Formatters\Reference\ByCertainPropertyIdGrouper::getOthers ( )
Returns
Snak[]

Member Data Documentation

◆ $groups

Wikibase\Lib\Formatters\Reference\ByCertainPropertyIdGrouper::$groups = []
private

◆ $hasUnknownPropertyId

Wikibase\Lib\Formatters\Reference\ByCertainPropertyIdGrouper::$hasUnknownPropertyId = false
private

◆ $otherGroup

Wikibase\Lib\Formatters\Reference\ByCertainPropertyIdGrouper::$otherGroup = []
private

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