private function patchItem(Item $item, EntityDiff $patch) { $this->fingerprintPatcher->patchFingerprint($item->getFingerprint(), $patch); if ($patch instanceof ItemDiff) { $item->setSiteLinkList($this->siteLinkListPatcher->getPatchedSiteLinkList($item->getSiteLinkList(), $patch->getSiteLinkDiff())); } $item->setStatements($this->statementListPatcher->getPatchedStatementList($item->getStatements(), $patch->getClaimsDiff())); }
private function getPatchedFingerprint(Fingerprint $fingerprint, EntityDiff $patch) { $patched = unserialize(serialize($fingerprint)); $patcher = new FingerprintPatcher(); $patcher->patchFingerprint($patched, $patch); return $patched; }
private function patchProperty(Property $property, EntityDiff $patch) { $this->fingerprintPatcher->patchFingerprint($property->getFingerprint(), $patch); $property->setStatements($this->statementListPatcher->getPatchedStatementList($property->getStatements(), $patch->getClaimsDiff())); }