Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101938191
HeraldStateReasons.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, Feb 15, 09:00
Size
616 B
Mime Type
text/x-php
Expires
Mon, Feb 17, 09:00 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24249513
Attached To
rPH Phabricator
HeraldStateReasons.php
View Options
<?php
abstract
class
HeraldStateReasons
extends
Phobject
{
abstract
public
function
explainReason
(
$reason
);
final
public
static
function
getAllReasons
()
{
return
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
__CLASS__
)
->
execute
();
}
final
public
static
function
getExplanation
(
$reason
)
{
$reasons
=
self
::
getAllReasons
();
foreach
(
$reasons
as
$reason_implementation
)
{
$explanation
=
$reason_implementation
->
explainReason
(
$reason
);
if
(
$explanation
!==
null
)
{
return
$explanation
;
}
}
return
pht
(
'Unknown reason ("%s").'
,
$reason
);
}
}
Event Timeline
Log In to Comment