Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93465077
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, Nov 28, 23:49
Size
616 B
Mime Type
text/x-php
Expires
Sat, Nov 30, 23:49 (2 d)
Engine
blob
Format
Raw Data
Handle
22641686
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