]> git.mxchange.org Git - friendica.git/blob - src/Object/Api/Mastodon/InstanceV2.php
Merge pull request #13618 from annando/display
[friendica.git] / src / Object / Api / Mastodon / InstanceV2.php
1 <?php
2 /**
3  * @copyright Copyright (C) 2010-2023, 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;
23
24 use Friendica\BaseDataTransferObject;
25 use Friendica\Object\Api\Mastodon\InstanceV2\Configuration;
26 use Friendica\Object\Api\Mastodon\InstanceV2\Contact;
27 use Friendica\Object\Api\Mastodon\InstanceV2\FriendicaExtensions;
28 use Friendica\Object\Api\Mastodon\InstanceV2\Registrations;
29 use Friendica\Object\Api\Mastodon\InstanceV2\Thumbnail;
30 use Friendica\Object\Api\Mastodon\InstanceV2\Usage;
31
32 /**
33  * Class Instance
34  *
35  * @see https://docs.joinmastodon.org/entities/Instance/
36  */
37 class InstanceV2 extends BaseDataTransferObject
38 {
39         /** @var string */
40         protected $domain;
41         /** @var string */
42         protected $title;
43         /** @var string */
44         protected $version;
45         /** @var string */
46         protected $source_url;
47         /** @var string */
48         protected $description;
49         /** @var Usage */
50         protected $usage;
51         /** @var Thumbnail */
52         protected $thumbnail;
53         /** @var array */
54         protected $languages;
55         /** @var Configuration  */
56         protected $configuration;
57         /** @var Registrations */
58         protected $registrations;
59         /** @var Contact */
60         protected $contact;
61         /** @var array */
62         protected $rules = [];
63         /** @var FriendicaExtensions */
64         protected $friendica;
65
66         /**
67          * @param string $domain
68          * @param string $title
69          * @param $version
70          * @param string $description
71          * @param Usage $usage
72          * @param Thumbnail $thumbnail
73          * @param array $languages
74          * @param Configuration $configuration
75          * @param Registrations $registrations
76          * @param Contact $contact
77          * @param FriendicaExtensions $friendica_extensions
78          * @param array $rules
79          */
80         public function __construct(
81                 string              $domain,
82                 string              $title,
83                 string              $version,
84                 string              $source_url,
85                 string              $description,
86                 Usage               $usage,
87                 Thumbnail           $thumbnail,
88                 array               $languages,
89                 Configuration       $configuration,
90                 Registrations       $registrations,
91                 Contact             $contact,
92                 FriendicaExtensions $friendica_extensions,
93                 array $rules
94         ) {
95                 $this->domain        = $domain;
96                 $this->title         = $title;
97                 $this->version       = $version;
98                 $this->source_url    = $source_url;
99                 $this->description   = $description;
100                 $this->usage         = $usage;
101                 $this->thumbnail     = $thumbnail;
102                 $this->languages     = $languages;
103                 $this->configuration = $configuration;
104                 $this->registrations = $registrations;
105                 $this->contact       = $contact;
106                 $this->rules         = $rules;
107                 $this->friendica     = $friendica_extensions;
108         }
109 }