MediaWiki
REL1_39
UserEditCountInfo.php
Go to the documentation of this file.
1
<?php
2
3
use
MediaWiki\User\UserIdentity
;
4
9
class
UserEditCountInfo
{
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
}
UserEditCountInfo
Helper class for UserEditCountUpdate.
Definition
UserEditCountInfo.php:9
UserEditCountInfo\getIncrement
getIncrement()
Definition
UserEditCountInfo.php:48
UserEditCountInfo\getUser
getUser()
Definition
UserEditCountInfo.php:41
UserEditCountInfo\__construct
__construct(UserIdentity $user, int $increment)
Definition
UserEditCountInfo.php:21
UserEditCountInfo\merge
merge(self $other)
Merge another UserEditCountInfo into this one.
Definition
UserEditCountInfo.php:31
MediaWiki\User\UserIdentity
Interface for objects representing user identity.
Definition
UserIdentity.php:39
includes
deferred
UserEditCountInfo.php
Generated on Mon Dec 2 2024 06:22:58 for MediaWiki by
1.10.0