]> git.mxchange.org Git - friendica.git/blob - src/Object/Search/ContactResult.php
Merge remote-tracking branch 'upstream/develop' into baseurl
[friendica.git] / src / Object / Search / ContactResult.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\Search;
23
24 use Friendica\Model\Search;
25 use Psr\Http\Message\UriInterface;
26
27 /**
28  * A search result for contact searching
29  *
30  * @see Search for details
31  */
32 class ContactResult implements IResult
33 {
34         /**
35          * @var int
36          */
37         private $cid;
38         /**
39          * @var int
40          */
41         private $pCid;
42         /**
43          * @var string
44          */
45         private $name;
46         /**
47          * @var string
48          */
49         private $addr;
50         /**
51          * @var string
52          */
53         private $item;
54         /**
55          * @var UriInterface
56          */
57         private $url;
58         /**
59          * @var string
60          */
61         private $photo;
62         /**
63          * @var string
64          */
65         private $tags;
66         /**
67          * @var string
68          */
69         private $network;
70
71         /**
72          * @return int
73          */
74         public function getCid()
75         {
76                 return $this->cid;
77         }
78
79         /**
80          * @return int
81          */
82         public function getPCid()
83         {
84                 return $this->pCid;
85         }
86
87         /**
88          * @return string
89          */
90         public function getName()
91         {
92                 return $this->name;
93         }
94
95         /**
96          * @return string
97          */
98         public function getAddr()
99         {
100                 return $this->addr;
101         }
102
103         /**
104          * @return string
105          */
106         public function getItem()
107         {
108                 return $this->item;
109         }
110
111         /**
112          * @return UriInterface
113          */
114         public function getUrl(): UriInterface
115         {
116                 return $this->url;
117         }
118
119         /**
120          * @return string
121          */
122         public function getPhoto()
123         {
124                 return $this->photo;
125         }
126
127         /**
128          * @return string
129          */
130         public function getTags()
131         {
132                 return $this->tags;
133         }
134
135         /**
136          * @return string
137          */
138         public function getNetwork()
139         {
140                 return $this->network;
141         }
142
143         /**
144          * @param string $name
145          * @param string $addr
146          * @param string $item
147          * @param UriInterface $url
148          * @param string $photo
149          * @param string $network
150          * @param int    $cid
151          * @param int    $pCid
152          * @param string $tags
153          */
154         public function __construct($name, $addr, $item, UriInterface $url, $photo, $network, $cid = 0, $pCid = 0, $tags = '')
155         {
156                 $this->name    = $name;
157                 $this->addr    = $addr;
158                 $this->item    = $item;
159                 $this->url     = $url;
160                 $this->photo   = $photo;
161                 $this->network = $network;
162
163                 $this->cid  = $cid;
164                 $this->pCid = $pCid;
165                 $this->tags = $tags;
166         }
167 }