Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4069204
TranslationUnitIssue.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
TranslationUnitIssue.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Extension\Translate\PageTranslation
;
use
InvalidArgumentException
;
use
MediaWiki\Extension\Translate\Validation\ValidationIssue
;
use
Wikimedia\Message\MessageSpecifier
;
/**
* @author Niklas Laxström
* @license GPL-2.0-or-later
* @since 2021.05
* @see ValidationIssue (similar, but different use case)
*/
class
TranslationUnitIssue
implements
MessageSpecifier
{
public
const
ERROR
=
'error'
;
public
const
WARNING
=
'warning'
;
/** @var string self::ERROR|self::WARNING */
private
string
$severity
;
private
string
$messageKey
;
private
array
$messageParams
;
public
function
__construct
(
string
$severity
,
string
$messageKey
,
array
$messageParams
=
[]
)
{
if
(
!
in_array
(
$severity
,
[
self
::
ERROR
,
self
::
WARNING
]
)
)
{
throw
new
InvalidArgumentException
(
'Invalid value for severity: '
.
$severity
);
}
$this
->
severity
=
$severity
;
$this
->
messageKey
=
$messageKey
;
$this
->
messageParams
=
$messageParams
;
}
public
function
getSeverity
():
string
{
return
$this
->
severity
;
}
public
function
getKey
():
string
{
return
$this
->
messageKey
;
}
public
function
getParams
():
array
{
return
$this
->
messageParams
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 16 2026, 21:35 (12 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
26/a8/4b3b9aafe0f1ad5a3bb424f9d5a8
Default Alt Text
TranslationUnitIssue.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment