3 * @copyright Copyright (C) 2010-2023, 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\Navigation\Notifications\ValueObject;
25 * A view-only object for printing introduction notifications to the frontend
27 class Introduction implements \JsonSerializable
56 private $postNewFriend;
78 public function getLabel(): string
83 public function getType(): string
88 public function getIntroId(): int
90 return $this->intro_id;
93 public function getMadeBy(): string
98 public function getMadeByUrl(): string
100 return $this->madeByUrl;
103 public function getMadeByZrl(): string
105 return $this->madeByZrl;
108 public function getMadeByAddr(): string
110 return $this->madeByAddr;
113 public function getContactId(): int
115 return $this->contactId;
118 public function getPhoto(): string
123 public function getName(): string
128 public function getUrl(): string
133 public function getZrl(): string
138 public function isHidden(): bool
140 return $this->hidden;
143 public function getPostNewFriend(): int
145 return $this->postNewFriend;
148 public function getKnowYou(): string
150 return $this->knowYou;
153 public function getNote(): string
158 public function getRequest(): string
160 return $this->request;
163 public function getDfrnId(): int
165 return $this->dfrnId;
168 public function getAddr(): string
173 public function getNetwork(): string
175 return $this->network;
178 public function getUid(): int
183 public function getKeywords(): string
185 return $this->keywords;
188 public function getLocation(): string
190 return $this->location;
193 public function getAbout(): string
198 public function __construct(array $data = [])
200 $this->label = $data['label'] ?? '';
201 $this->type = $data['str_type'] ?? '';
202 $this->intro_id = $data['intro_id'] ?? -1;
203 $this->madeBy = $data['madeBy'] ?? '';
204 $this->madeByUrl = $data['madeByUrl'] ?? '';
205 $this->madeByZrl = $data['madeByZrl'] ?? '';
206 $this->madeByAddr = $data['madeByAddr'] ?? '';
207 $this->contactId = $data['contactId'] ?? -1;
208 $this->photo = $data['photo'] ?? '';
209 $this->name = $data['name'] ?? '';
210 $this->url = $data['url'] ?? '';
211 $this->zrl = $data['zrl'] ?? '';
212 $this->hidden = $data['hidden'] ?? false;
213 $this->postNewFriend = $data['postNewFriend'] ?? '';
214 $this->knowYou = $data['knowYou'] ?? false;
215 $this->note = $data['note'] ?? '';
216 $this->request = $data['request'] ?? '';
218 $this->addr = $data['addr'] ?? '';
219 $this->network = $data['network'] ?? '';
220 $this->uid = $data['uid'] ?? -1;
221 $this->keywords = $data['keywords'] ?? '';
222 $this->location = $data['location'] ?? '';
223 $this->about = $data['about'] ?? '';
229 #[\ReturnTypeWillChange]
230 public function jsonSerialize()
232 return $this->toArray();
238 public function toArray(): array
240 return get_object_vars($this);