Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5975639
TranslatablePageStatus.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
944 B
Referenced Files
None
Subscribers
None
TranslatablePageStatus.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Extension\Translate\PageTranslation
;
use
InvalidArgumentException
;
use
MediaWiki\Extension\Translate\MessageGroupProcessing\TranslatableBundleStatus
;
/**
* Stores and validates possible statuses for TranslatablePage
* @author Abijeet Patro
* @since 2022.09
* @license GPL-2.0-or-later
*/
class
TranslatablePageStatus
implements
TranslatableBundleStatus
{
public
const
PROPOSED
=
1
;
public
const
ACTIVE
=
2
;
public
const
OUTDATED
=
3
;
public
const
BROKEN
=
4
;
private
int
$status
;
public
function
__construct
(
int
$status
)
{
if
(
!
in_array
(
$status
,
[
self
::
PROPOSED
,
self
::
ACTIVE
,
self
::
OUTDATED
,
self
::
BROKEN
]
)
)
{
throw
new
InvalidArgumentException
(
"Invalid status: $status"
);
}
$this
->
status
=
$status
;
}
public
function
isEqual
(
int
$status
):
bool
{
return
$this
->
status
===
$status
;
}
public
function
getId
():
int
{
return
$this
->
status
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 18:23 (2 h, 32 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
df/ab/3ecc13299c7e06530905b0ea9a5f
Default Alt Text
TranslatablePageStatus.php (944 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment