3 namespace Friendica\Object\Notification;
6 * A view-only object for printing item notifications to the frontend
8 class Notification implements \JsonSerializable
10 const SYSTEM = 'system';
11 const PERSONAL = 'personal';
12 const NETWORK = 'network';
13 const INTRO = 'intro';
31 private $seen = false;
36 public function getLabel()
44 public function getLink()
52 public function getImage()
60 public function getUrl()
68 public function getText()
76 public function getWhen()
84 public function getAgo()
92 public function isSeen()
97 public function __construct(array $data)
99 $this->label = $data['label'] ?? '';
100 $this->link = $data['link'] ?? '';
101 $this->image = $data['image'] ?? '';
102 $this->url = $data['url'] ?? '';
103 $this->text = $data['text'] ?? '';
104 $this->when = $data['when'] ?? '';
105 $this->ago = $data['ago'] ?? '';
106 $this->seen = $data['seen'] ?? false;
112 public function jsonSerialize()
114 return get_object_vars($this);
120 public function toArray()
122 return get_object_vars($this);