Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\ClaimSummaryBuilder Class Reference

EditSummary-Builder for claim operations. More...

Public Member Functions

 __construct ( $apiModuleName, ClaimDiffer $claimDiffer)
 
 buildClaimSummary (?Statement $oldStatement, Statement $newStatement)
 Checks what has actually changed inside a statement by looking at a ClaimDifference, constructs an edit-summary based upon that information and returns a Summary object holding this edit-summary. More...
 

Private Member Functions

 buildSummaryArgs (Statement $newStatement, $guid)
 Builds an associative array that can be used as summary arguments. More...
 

Private Attributes

 $apiModuleName
 
 $claimDiffer
 

Detailed Description

EditSummary-Builder for claim operations.

Author
Tobias Gritschacher < tobia.nosp@m.s.gr.nosp@m.itsch.nosp@m.ache.nosp@m.r@wik.nosp@m.imed.nosp@m.ia.de >
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ClaimSummaryBuilder::__construct (   $apiModuleName,
ClaimDiffer  $claimDiffer 
)
Parameters
string$apiModuleName
ClaimDiffer$claimDiffer
Exceptions
InvalidArgumentException

Member Function Documentation

◆ buildClaimSummary()

Wikibase\Repo\ClaimSummaryBuilder::buildClaimSummary ( ?Statement  $oldStatement,
Statement  $newStatement 
)

Checks what has actually changed inside a statement by looking at a ClaimDifference, constructs an edit-summary based upon that information and returns a Summary object holding this edit-summary.

Parameters
Statement | null$oldStatement
Statement$newStatement
Returns
Summary

◆ buildSummaryArgs()

Wikibase\Repo\ClaimSummaryBuilder::buildSummaryArgs ( Statement  $newStatement,
  $guid 
)
private

Builds an associative array that can be used as summary arguments.

It uses property IDs as array keys and builds arrays of the main Snaks of all statements given by the GUIDs.

Parameters
Statement$newStatement
string$guid
Returns
array[] Associative array that contains property ID => array of main Snaks

Member Data Documentation

◆ $apiModuleName

Wikibase\Repo\ClaimSummaryBuilder::$apiModuleName
private

◆ $claimDiffer

Wikibase\Repo\ClaimSummaryBuilder::$claimDiffer
private

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