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