Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77573197
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
Thu, Aug 15, 06:29
Size
616 B
Mime Type
text/x-php
Expires
Sat, Aug 17, 06:29 (2 d)
Engine
blob
Format
Raw Data
Handle
19890301
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