Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\StatementGrouperBuilder Class Reference

Factory for a StatementGrouper. More...

Public Member Functions

 __construct (array $specifications, PropertyDataTypeLookup $dataTypeLookup, StatementGuidParser $statementGuidParser)
 
 getStatementGrouper ()
 

Private Member Functions

 newFilteringStatementGrouper (array $filterSpecs)
 
 newStatementFilter (array $spec)
 
 requireField (array $spec, $field)
 

Private Attributes

 $specifications
 
 $dataTypeLookup
 
 $statementGuidParser
 

Detailed Description

Factory for a StatementGrouper.

The grouper is instantiated based on a specification array that has the following form:

[ 'item' => [ 'statements' => null, 'example' => [ 'type' => 'propertySet', 'propertyIds' => [ 'P1' ], ], 'identifiers' => [ 'type' => 'dataType', 'dataTypes' => [ 'external-id' ], ], ], 'property' => [ ], ],

Author
Daniel Kinzler
Thiemo Kreuz

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\StatementGrouperBuilder::__construct ( array $specifications,
PropertyDataTypeLookup $dataTypeLookup,
StatementGuidParser $statementGuidParser )
Parameters
array[]$specificationsSee the class level documentation for details.
PropertyDataTypeLookup$dataTypeLookup
StatementGuidParser$statementGuidParser

Member Function Documentation

◆ getStatementGrouper()

Wikibase\Repo\StatementGrouperBuilder::getStatementGrouper ( )
Exceptions
InvalidArgumentException
Returns
StatementGrouper

◆ newFilteringStatementGrouper()

Wikibase\Repo\StatementGrouperBuilder::newFilteringStatementGrouper ( array $filterSpecs)
private
Parameters
array[]$filterSpecs
Exceptions
InvalidArgumentException
Returns
FilteringStatementGrouper

◆ newStatementFilter()

Wikibase\Repo\StatementGrouperBuilder::newStatementFilter ( array $spec)
private
Parameters
array$spec
Exceptions
InvalidArgumentException
Returns
StatementFilter

◆ requireField()

Wikibase\Repo\StatementGrouperBuilder::requireField ( array $spec,
$field )
private
Parameters
array$spec
string$field
Exceptions
InvalidArgumentException

Member Data Documentation

◆ $dataTypeLookup

Wikibase\Repo\StatementGrouperBuilder::$dataTypeLookup
private

◆ $specifications

Wikibase\Repo\StatementGrouperBuilder::$specifications
private

◆ $statementGuidParser

Wikibase\Repo\StatementGrouperBuilder::$statementGuidParser
private

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