3 * @copyright Copyright (C) 2020, Friendica
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 = '';
76 private $location = '';
83 public function getLabel()
91 public function getType()
99 public function getIntroId()
101 return $this->intro_id;
107 public function getMadeBy()
109 return $this->madeBy;
115 public function getMadeByUrl()
117 return $this->madeByUrl;
123 public function getMadeByZrl()
125 return $this->madeByZrl;
131 public function getMadeByAddr()
133 return $this->madeByAddr;
139 public function getContactId()
141 return $this->contactId;
147 public function getPhoto()
155 public function getName()
163 public function getUrl()
171 public function getZrl()
179 public function isHidden()
181 return $this->hidden;
187 public function getPostNewFriend()
189 return $this->postNewFriend;
195 public function getKnowYou()
197 return $this->knowYou;
203 public function getNote()
211 public function getRequest()
213 return $this->request;
219 public function getDfrnId()
221 return $this->dfrnId;
227 public function getAddr()
235 public function getNetwork()
237 return $this->network;
243 public function getUid()
251 public function getKeywords()
253 return $this->keywords;
259 public function getGender()
261 return $this->gender;
267 public function getLocation()
269 return $this->location;
275 public function getAbout()
280 public function __construct(array $data = [])
282 $this->label = $data['label'] ?? '';
283 $this->type = $data['str_type'] ?? '';
284 $this->intro_id = $data['intro_id'] ?? -1;
285 $this->madeBy = $data['madeBy'] ?? '';
286 $this->madeByUrl = $data['madeByUrl'] ?? '';
287 $this->madeByZrl = $data['madeByZrl'] ?? '';
288 $this->madeByAddr = $data['madeByAddr'] ?? '';
289 $this->contactId = $data['contactId'] ?? '';
290 $this->photo = $data['photo'] ?? '';
291 $this->name = $data['name'] ?? '';
292 $this->url = $data['url'] ?? '';
293 $this->zrl = $data['zrl'] ?? '';
294 $this->hidden = $data['hidden'] ?? false;
295 $this->postNewFriend = $data['postNewFriend'] ?? '';
296 $this->knowYou = $data['knowYou'] ?? false;
297 $this->note = $data['note'] ?? '';
298 $this->request = $data['request'] ?? '';
299 $this->dfrnId = $data['dfrn_id'] ?? -1;
300 $this->addr = $data['addr'] ?? '';
301 $this->network = $data['network'] ?? '';
302 $this->uid = $data['uid'] ?? -1;
303 $this->keywords = $data['keywords'] ?? '';
304 $this->gender = $data['gender'] ?? '';
305 $this->location = $data['location'] ?? '';
306 $this->about = $data['about'] ?? '';
312 public function jsonSerialize()
314 return $this->toArray();
320 public function toArray()
322 return get_object_vars($this);