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\Federation\Entity;
24 use DateTimeImmutable;
25 use Psr\Http\Message\UriInterface;
28 * @property-read int $id
29 * @property-read string $url
30 * @property-read string $nurl
31 * @property-read string $version
32 * @property-read string $siteName
33 * @property-read string $info
34 * @property-read int $registerPolicy
35 * @property-read int $registeredUsers
36 * @property-read string $poco
37 * @property-read string $noscrape
38 * @property-read string $network
39 * @property-read string $platform
40 * @property-read int $relaySubscribe
41 * @property-read string $relayScope
42 * @property-read DateTimeImmutable $created
43 * @property-read ?DateTimeImmutable $lastPocoQuery
44 * @property-read ?DateTimeImmutable $lastContact
45 * @property-read ?DateTimeImmutable $lastFailure
46 * @property-read int $directoryType
47 * @property-read int $detectionMethod
48 * @property-read bool $failed
49 * @property-read DateTimeImmutable $nextContact
50 * @property-read int $protocol
51 * @property-read int $activeWeekUsers
52 * @property-read int $activeMonthUsers
53 * @property-read int $activeHalfyearUsers
54 * @property-read int $localPosts
55 * @property-read int $localComments
56 * @property-read bool $blocked
58 class GServer extends \Friendica\BaseEntity
62 /** @var UriInterface */
64 /** @var UriInterface */
72 /** @var int One of Module\Register::* constant values */
73 protected $registerPolicy;
75 protected $registeredUsers;
76 /** @var ?UriInterface */
78 /** @var ?UriInterface */
80 /** @var string One of the Protocol::* constant values */
85 protected $relaySubscribe;
87 protected $relayScope;
88 /** @var DateTimeImmutable */
90 /** @var DateTimeImmutable */
91 protected $lastPocoQuery;
92 /** @var DateTimeImmutable */
93 protected $lastContact;
94 /** @var DateTimeImmutable */
95 protected $lastFailure;
96 /** @var int One of Model\Gserver::DT_* constant values */
97 protected $directoryType;
98 /** @var ?int One of Model\Gserver::DETECT_* constant values */
99 protected $detectionMethod;
102 /** @var DateTimeImmutable */
103 protected $nextContact;
104 /** @var ?int One of Model\Post\DeliveryData::* constant values */
107 protected $activeWeekUsers;
109 protected $activeMonthUsers;
111 protected $activeHalfyearUsers;
113 protected $localPosts;
115 protected $localComments;
119 public function __construct(UriInterface $url, UriInterface $nurl, string $version, string $siteName, string $info, int $registerPolicy, int $registeredUsers, ?UriInterface $poco, ?UriInterface $noscrape, string $network, string $platform, bool $relaySubscribe, string $relayScope, DateTimeImmutable $created, ?DateTimeImmutable $lastPocoQuery, ?DateTimeImmutable $lastContact, ?DateTimeImmutable $lastFailure, int $directoryType, ?int $detectionMethod, bool $failed, ?DateTimeImmutable $nextContact, ?int $protocol, ?int $activeWeekUsers, ?int $activeMonthUsers, ?int $activeHalfyearUsers, ?int $localPosts, ?int $localComments, bool $blocked, ?int $id = null)
123 $this->version = $version;
124 $this->siteName = $siteName;
126 $this->registerPolicy = $registerPolicy;
127 $this->registeredUsers = $registeredUsers;
129 $this->noscrape = $noscrape;
130 $this->network = $network;
131 $this->platform = $platform;
132 $this->relaySubscribe = $relaySubscribe;
133 $this->relayScope = $relayScope;
134 $this->created = $created;
135 $this->lastPocoQuery = $lastPocoQuery;
136 $this->lastContact = $lastContact;
137 $this->lastFailure = $lastFailure;
138 $this->directoryType = $directoryType;
139 $this->detectionMethod = $detectionMethod;
140 $this->failed = $failed;
141 $this->nextContact = $nextContact;
142 $this->protocol = $protocol;
143 $this->activeWeekUsers = $activeWeekUsers;
144 $this->activeMonthUsers = $activeMonthUsers;
145 $this->activeHalfyearUsers = $activeHalfyearUsers;
146 $this->localPosts = $localPosts;
147 $this->localComments = $localComments;
148 $this->blocked = $blocked;