Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106766347
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
Mon, Mar 31, 07:52
Size
616 B
Mime Type
text/x-php
Expires
Wed, Apr 2, 07:52 (2 d)
Engine
blob
Format
Raw Data
Handle
25269931
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