Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105897720
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, Mar 20, 16:08
Size
616 B
Mime Type
text/x-php
Expires
Sat, Mar 22, 16:08 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25068170
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