Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93597962
DrydockLeaseStatus.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 30, 01:24
Size
936 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 01:24 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22673324
Attached To
rPH Phabricator
DrydockLeaseStatus.php
View Options
<?php
final
class
DrydockLeaseStatus
extends
DrydockConstants
{
const
STATUS_PENDING
=
0
;
const
STATUS_ACQUIRING
=
5
;
const
STATUS_ACTIVE
=
1
;
const
STATUS_RELEASED
=
2
;
const
STATUS_BROKEN
=
3
;
const
STATUS_EXPIRED
=
4
;
public
static
function
getNameForStatus
(
$status
)
{
$map
=
array
(
self
::
STATUS_PENDING
=>
pht
(
'Pending'
),
self
::
STATUS_ACQUIRING
=>
pht
(
'Acquiring'
),
self
::
STATUS_ACTIVE
=>
pht
(
'Active'
),
self
::
STATUS_RELEASED
=>
pht
(
'Released'
),
self
::
STATUS_BROKEN
=>
pht
(
'Broken'
),
self
::
STATUS_EXPIRED
=>
pht
(
'Expired'
),
);
return
idx
(
$map
,
$status
,
pht
(
'Unknown'
));
}
public
static
function
getAllStatuses
()
{
return
array
(
self
::
STATUS_PENDING
,
self
::
STATUS_ACQUIRING
,
self
::
STATUS_ACTIVE
,
self
::
STATUS_RELEASED
,
self
::
STATUS_BROKEN
,
self
::
STATUS_EXPIRED
,
);
}
}
Event Timeline
Log In to Comment