Wikibase
MediaWiki Wikibase extension
Wikibase\DataModel\Services\ByPropertyIdGrouper Class Reference

Groups property id providers by their property id. More...

Public Member Functions

 __construct ( $propertyIdProviders)
 
 getPropertyIds ()
 Returns all property ids which were found. More...
 
 getByPropertyId (NumericPropertyId $propertyId)
 Returns the PropertyIdProvider instances for the given NumericPropertyId. More...
 
 hasPropertyId (NumericPropertyId $propertyId)
 Checks if there are PropertyIdProvider instances for the given NumericPropertyId. More...
 

Private Member Functions

 assertArePropertyIdProviders ( $propertyIdProviders)
 
 indexPropertyIdProviders ( $propertyIdProviders)
 
 addPropertyIdProvider (PropertyIdProvider $propertyIdProvider)
 

Private Attributes

 $byPropertyId = []
 

Detailed Description

Groups property id providers by their property id.

Since
1.0
Author
Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataModel\Services\ByPropertyIdGrouper::__construct (   $propertyIdProviders)
Parameters
PropertyIdProvider[] | Traversable$propertyIdProviders
Exceptions
InvalidArgumentException

Member Function Documentation

◆ addPropertyIdProvider()

Wikibase\DataModel\Services\ByPropertyIdGrouper::addPropertyIdProvider ( PropertyIdProvider  $propertyIdProvider)
private

◆ assertArePropertyIdProviders()

Wikibase\DataModel\Services\ByPropertyIdGrouper::assertArePropertyIdProviders (   $propertyIdProviders)
private

◆ getByPropertyId()

Wikibase\DataModel\Services\ByPropertyIdGrouper::getByPropertyId ( NumericPropertyId  $propertyId)

Returns the PropertyIdProvider instances for the given NumericPropertyId.

Since
1.0
Parameters
NumericPropertyId$propertyId
Exceptions
OutOfBoundsException
Returns
PropertyIdProvider[]

◆ getPropertyIds()

Wikibase\DataModel\Services\ByPropertyIdGrouper::getPropertyIds ( )

Returns all property ids which were found.

Since
1.0
Returns
NumericPropertyId[]

◆ hasPropertyId()

Wikibase\DataModel\Services\ByPropertyIdGrouper::hasPropertyId ( NumericPropertyId  $propertyId)

Checks if there are PropertyIdProvider instances for the given NumericPropertyId.

Since
1.0
Parameters
NumericPropertyId$propertyId
Returns
bool

◆ indexPropertyIdProviders()

Wikibase\DataModel\Services\ByPropertyIdGrouper::indexPropertyIdProviders (   $propertyIdProviders)
private
Parameters
PropertyIdProvider[] | Traversable$propertyIdProviders

Member Data Documentation

◆ $byPropertyId

Wikibase\DataModel\Services\ByPropertyIdGrouper::$byPropertyId = []
private

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