3 abstract class HeraldStateReasons
extends Phobject
{
5 abstract public function explainReason($reason);
7 final public static function getAllReasons() {
8 return id(new PhutilClassMapQuery())
9 ->setAncestorClass(__CLASS__
)
13 final public static function getExplanation($reason) {
14 $reasons = self
::getAllReasons();
16 foreach ($reasons as $reason_implementation) {
17 $explanation = $reason_implementation->explainReason($reason);
18 if ($explanation !== null) {
23 return pht('Unknown reason ("%s").', $reason);