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 (PropertyId $propertyId)
 Returns the PropertyIdProvider instances for the given PropertyId. More...
 
 hasPropertyId (PropertyId $propertyId)
 Checks if there are PropertyIdProvider instances for the given PropertyId. 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 ( PropertyId  $propertyId)

Returns the PropertyIdProvider instances for the given PropertyId.

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

◆ getPropertyIds()

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

Returns all property ids which were found.

Since
1.0
Returns
PropertyId[]

◆ hasPropertyId()

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

Checks if there are PropertyIdProvider instances for the given PropertyId.

Since
1.0
Parameters
PropertyId$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: