3 * @copyright Copyright (C) 2010-2021, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 namespace Friendica\Object\Notification;
25 * A view-only object for printing introduction notifications to the frontend
27 class Introduction implements \JsonSerializable
34 private $intro_id = -1;
38 private $madeByUrl = '';
40 private $madeByZrl = '';
42 private $madeByAddr = '';
44 private $contactId = -1;
54 private $hidden = false;
56 private $postNewFriend = -1;
58 private $knowYou = false;
62 private $request = '';
68 private $network = '';
72 private $keywords = '';
74 private $location = '';
81 public function getLabel()
89 public function getType()
97 public function getIntroId()
99 return $this->intro_id;
105 public function getMadeBy()
107 return $this->madeBy;
113 public function getMadeByUrl()
115 return $this->madeByUrl;
121 public function getMadeByZrl()
123 return $this->madeByZrl;
129 public function getMadeByAddr()
131 return $this->madeByAddr;
137 public function getContactId()
139 return $this->contactId;
145 public function getPhoto()
153 public function getName()
161 public function getUrl()
169 public function getZrl()
177 public function isHidden()
179 return $this->hidden;
185 public function getPostNewFriend()
187 return $this->postNewFriend;
193 public function getKnowYou()
195 return $this->knowYou;
201 public function getNote()
209 public function getRequest()
211 return $this->request;
217 public function getDfrnId()
219 return $this->dfrnId;
225 public function getAddr()
233 public function getNetwork()
235 return $this->network;
241 public function getUid()
249 public function getKeywords()
251 return $this->keywords;
257 public function getLocation()
259 return $this->location;
265 public function getAbout()
270 public function __construct(array $data = [])
272 $this->label = $data['label'] ?? '';
273 $this->type = $data['str_type'] ?? '';
274 $this->intro_id = $data['intro_id'] ?? -1;
275 $this->madeBy = $data['madeBy'] ?? '';
276 $this->madeByUrl = $data['madeByUrl'] ?? '';
277 $this->madeByZrl = $data['madeByZrl'] ?? '';
278 $this->madeByAddr = $data['madeByAddr'] ?? '';
279 $this->contactId = $data['contactId'] ?? '';
280 $this->photo = $data['photo'] ?? '';
281 $this->name = $data['name'] ?? '';
282 $this->url = $data['url'] ?? '';
283 $this->zrl = $data['zrl'] ?? '';
284 $this->hidden = $data['hidden'] ?? false;
285 $this->postNewFriend = $data['postNewFriend'] ?? '';
286 $this->knowYou = $data['knowYou'] ?? false;
287 $this->note = $data['note'] ?? '';
288 $this->request = $data['request'] ?? '';
290 $this->addr = $data['addr'] ?? '';
291 $this->network = $data['network'] ?? '';
292 $this->uid = $data['uid'] ?? -1;
293 $this->keywords = $data['keywords'] ?? '';
294 $this->location = $data['location'] ?? '';
295 $this->about = $data['about'] ?? '';
301 public function jsonSerialize()
303 return $this->toArray();
309 public function toArray()
311 return get_object_vars($this);