Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6048408
Filter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
Filter.php
View Options
<?php
namespace
MediaWiki\Extension\AbuseFilter\Filter
;
use
MediaWiki\User\UserIdentity
;
/**
* Immutable value object representing a "complete" filter. This can be used to represent filters
* that already exist in the database, but you should probably use subclasses for that.
*/
class
Filter
extends
AbstractFilter
{
/** @var LastEditInfo */
protected
$lastEditInfo
;
/** @var int|null Can be null if not specified */
protected
$id
;
/** @var int|null Can be null if the filter is not current */
protected
$hitCount
;
/** @var bool|null Can be null if the filter is not current */
protected
$throttled
;
/**
* @param Specs $specs
* @param Flags $flags
* @param callable|array[] $actions Array with params or callable that will return them
* @phan-param array[]|callable():array[] $actions
* @param LastEditInfo $lastEditInfo
* @param int|null $id
* @param int|null $hitCount
* @param bool|null $throttled
*/
public
function
__construct
(
Specs
$specs
,
Flags
$flags
,
$actions
,
LastEditInfo
$lastEditInfo
,
?
int
$id
=
null
,
?
int
$hitCount
=
null
,
?
bool
$throttled
=
null
)
{
parent
::
__construct
(
$specs
,
$flags
,
$actions
);
$this
->
lastEditInfo
=
clone
$lastEditInfo
;
$this
->
id
=
$id
;
$this
->
hitCount
=
$hitCount
;
$this
->
throttled
=
$throttled
;
}
public
function
getLastEditInfo
():
LastEditInfo
{
return
clone
$this
->
lastEditInfo
;
}
public
function
getID
():
?
int
{
return
$this
->
id
;
}
/**
* @deprecated since 1.45 Use ::getUserIdentity() instead
*/
public
function
getUserID
():
int
{
return
$this
->
lastEditInfo
->
getUserID
();
}
/**
* @deprecated since 1.45 Use ::getUserIdentity() instead
*/
public
function
getUserName
():
string
{
return
$this
->
lastEditInfo
->
getUserName
();
}
public
function
getUserIdentity
():
UserIdentity
{
return
$this
->
lastEditInfo
->
getUserIdentity
();
}
public
function
getTimestamp
():
string
{
return
$this
->
lastEditInfo
->
getTimestamp
();
}
public
function
getHitCount
():
?
int
{
return
$this
->
hitCount
;
}
public
function
isThrottled
():
?
bool
{
return
$this
->
throttled
;
}
/**
* Make sure we don't leave any (writeable) reference
*/
public
function
__clone
()
{
parent
::
__clone
();
$this
->
lastEditInfo
=
clone
$this
->
lastEditInfo
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 4 2026, 22:26 (5 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c6/b3/983175fbeb3ccc7db1802d7bdb4b
Default Alt Text
Filter.php (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment