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\Protocol\Diaspora\Entity;
24 use Psr\Http\Message\UriInterface;
27 * @property-read $uriId
29 * @property-read $guid
30 * @property-read $addr
31 * @property-read $alias
32 * @property-read $nick
33 * @property-read $name
34 * @property-read $givenName
35 * @property-read $familyName
36 * @property-read $photo
37 * @property-read $photoMedium
38 * @property-read $photoSmall
39 * @property-read $batch
40 * @property-read $notify
41 * @property-read $poll
42 * @property-read $subscribe
43 * @property-read $searchable
44 * @property-read $pubKey
45 * @property-read $baseurl
46 * @property-read $gsid
47 * @property-read $created
48 * @property-read $updated
49 * @property-read $interacting_count
50 * @property-read $interacted_count
51 * @property-read $post_count
53 class DiasporaContact extends \Friendica\BaseEntity
57 /** @var UriInterface */
63 /** @var UriInterface */
72 protected $familyName;
73 /** @var UriInterface */
75 /** @var UriInterface */
76 protected $photoMedium;
77 /** @var UriInterface */
78 protected $photoSmall;
79 /** @var UriInterface */
81 /** @var UriInterface */
83 /** @var UriInterface */
85 /** @var string URL pattern string including a placeholder "{uri}" that mustn't be URL-encoded */
88 protected $searchable;
91 /** @var UriInterface */
100 protected $interacting_count;
102 protected $interacted_count;
104 protected $post_count;
106 public function __construct(
107 UriInterface $url, \DateTime $created, string $guid = null, string $addr = null, UriInterface $alias = null,
108 string $nick = null, string $name = null, string $givenName = null, string $familyName = null,
109 UriInterface $photo = null, UriInterface $photoMedium = null, UriInterface $photoSmall = null,
110 UriInterface $batch = null, UriInterface $notify = null, UriInterface $poll = null, string $subscribe = null,
111 bool $searchable = null, string $pubKey = null, UriInterface $baseurl = null, int $gsid = null,
112 \DateTime $updated = null, int $interacting_count = 0, int $interacted_count = 0, int $post_count = 0, int $uriId = null
114 $this->uriId = $uriId;
118 $this->alias = $alias;
121 $this->givenName = $givenName;
122 $this->familyName = $familyName;
123 $this->photo = $photo;
124 $this->photoMedium = $photoMedium;
125 $this->photoSmall = $photoSmall;
126 $this->batch = $batch;
127 $this->notify = $notify;
129 $this->subscribe = $subscribe;
130 $this->searchable = $searchable;
131 $this->pubKey = $pubKey;
132 $this->baseurl = $baseurl;
134 $this->created = $created;
135 $this->updated = $updated;
136 $this->interacting_count = $interacting_count;
137 $this->interacted_count = $interacted_count;
138 $this->post_count = $post_count;