]> git.mxchange.org Git - friendica.git/blob - src/Navigation/Notifications/ValueObject/FormattedNotify.php
Avoid empty notifications / fixed link to the content
[friendica.git] / src / Navigation / Notifications / ValueObject / FormattedNotify.php
1 <?php
2 /**
3  * @copyright Copyright (C) 2010-2022, the Friendica project
4  *
5  * @license GNU AGPL version 3 or any later version
6  *
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.
11  *
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.
16  *
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/>.
19  *
20  */
21
22 namespace Friendica\Navigation\Notifications\ValueObject;
23
24 use Friendica\BaseDataTransferObject;
25
26 /**
27  * A view-only object for printing item notifications to the frontend
28  *
29  * @deprecated since 2022.05 Use \Friendica\Navigation\Notifications\ValueObject\FormattedNotification instead
30  */
31 class FormattedNotify extends BaseDataTransferObject
32 {
33         const SYSTEM   = 'system';
34         const PERSONAL = 'personal';
35         const NETWORK  = 'network';
36         const INTRO    = 'intro';
37         const HOME     = 'home';
38
39         /** @var string */
40         protected $label = '';
41         /** @var string */
42         protected $link = '';
43         /** @var string */
44         protected $image = '';
45         /** @var string */
46         protected $url = '';
47         /** @var string */
48         protected $text = '';
49         /** @var string */
50         protected $when = '';
51         /** @var string */
52         protected $ago = '';
53         /** @var boolean */
54         protected $seen = false;
55
56         public function __construct(string $label, string $link, string $image, string $url, string $text, string $when, string $ago, bool $seen)
57         {
58                 $this->label = $label ?? '';
59                 $this->link  = $link  ?? '';
60                 $this->image = $image ?? '';
61                 $this->url   = $url   ?? '';
62                 $this->text  = $text  ?? '';
63                 $this->when  = $when  ?? '';
64                 $this->ago   = $ago   ?? '';
65                 $this->seen  = $seen  ?? false;
66         }
67 }