MediaWiki REL1_39
UserEditCountInfo.php
Go to the documentation of this file.
1<?php
2
4
11 private $user;
12
14 private $increment;
15
21 public function __construct( UserIdentity $user, int $increment ) {
22 $this->user = $user;
23 $this->increment = $increment;
24 }
25
31 public function merge( self $other ) {
32 if ( !$this->user->equals( $other->user ) ) {
33 throw new InvalidArgumentException( __METHOD__ . ': user does not match' );
34 }
35 $this->increment += $other->increment;
36 }
37
41 public function getUser() {
42 return $this->user;
43 }
44
48 public function getIncrement() {
49 return $this->increment;
50 }
51}
Helper class for UserEditCountUpdate.
__construct(UserIdentity $user, int $increment)
merge(self $other)
Merge another UserEditCountInfo into this one.
Interface for objects representing user identity.