]> git.mxchange.org Git - friendica.git/blob - src/Object/Api/Mastodon/Status/UserAttributes.php
Merge pull request #10359 from annando/milliseconds
[friendica.git] / src / Object / Api / Mastodon / Status / UserAttributes.php
1 <?php
2 /**
3  * @copyright Copyright (C) 2010-2021, 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\Object\Api\Mastodon\Status;
23
24 /**
25  * Class UserAttributes
26  *
27  * @see https://docs.joinmastodon.org/entities/status
28  */
29 class UserAttributes
30 {
31         /** @var bool */
32         protected $favourited;
33         /** @var bool */
34         protected $reblogged;
35         /** @var bool */
36         protected $muted;
37         /** @var bool */
38         protected $bookmarked;
39         /** @var bool */
40         protected $pinned;
41
42         /**
43          * Creates a authorized user attributes object
44          *
45          * @param bool $favourited
46          * @param bool $reblogged
47          * @param bool $muted
48          * @param bool $bookmarked
49          * @param bool $pinned
50          * @throws \Friendica\Network\HTTPException\InternalServerErrorException
51          */
52         public function __construct(bool $favourited, bool $reblogged, bool $muted, bool $bookmarked, bool $pinned)
53         {
54                 $this->favourited = $favourited;
55                 $this->reblogged = $reblogged;
56                 $this->muted = $muted;
57                 $this->bookmarked = $bookmarked;
58                 $this->pinned = $pinned;
59         }
60
61         public function __get($name) {
62                 return $this->$name;
63         }
64 }