@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class HeraldEffect extends Phobject {
4
5 private $objectPHID;
6 private $action;
7 private $target;
8 private $rule;
9 private $reason;
10
11 public function setObjectPHID($object_phid) {
12 $this->objectPHID = $object_phid;
13 return $this;
14 }
15
16 /**
17 * @return string PHID of the object that Herald is applied on
18 */
19 public function getObjectPHID() {
20 return $this->objectPHID;
21 }
22
23 public function setAction($action) {
24 $this->action = $action;
25 return $this;
26 }
27
28 /**
29 * @return string ACTIONCONST of the HeraldAction
30 */
31 public function getAction() {
32 return $this->action;
33 }
34
35 public function setTarget($target) {
36 $this->target = $target;
37 return $this;
38 }
39
40 /**
41 * @return mixed
42 */
43 public function getTarget() {
44 return $this->target;
45 }
46
47 public function setRule(HeraldRule $rule) {
48 $this->rule = $rule;
49 return $this;
50 }
51
52 /**
53 * @return HeraldRule
54 */
55 public function getRule() {
56 return $this->rule;
57 }
58
59 public function setReason($reason) {
60 $this->reason = $reason;
61 return $this;
62 }
63
64 /**
65 * @return string Reason why Herald effect was applied, for example
66 * "Conditions were met for H123 RuleName"
67 */
68 public function getReason() {
69 return $this->reason;
70 }
71
72}