3 final class PhabricatorGuidanceMessage
8 private $severity = self
::SEVERITY_NOTICE
;
9 private $priority = 1000;
11 const SEVERITY_NOTICE
= 'notice';
12 const SEVERITY_WARNING
= 'warning';
14 public function setSeverity($severity) {
15 $this->severity
= $severity;
19 public function getSeverity() {
20 return $this->severity
;
23 public function setKey($key) {
28 public function getKey() {
32 public function setMessage($message) {
33 $this->message
= $message;
37 public function getMessage() {
38 return $this->message
;
41 public function getSortVector() {
42 return id(new PhutilSortVector())
43 ->addInt($this->getPriority());
46 public function setPriority($priority) {
47 $this->priority
= $priority;
51 public function getPriority() {
52 return $this->priority
;
55 public function getSeverityStrength() {
57 self
::SEVERITY_NOTICE
=> 1,
58 self
::SEVERITY_WARNING
=> 2,
61 return idx($map, $this->getSeverity(), 0);