Completed
Pull Request — master (#161)
by
unknown
07:58
created

Host::setUrlCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 6
rs 9.4285
1
<?php
2
namespace Yandex\Webmaster\Models;
3
4
use Yandex\Common\Model;
5
6
/**
7
 * Class Host
8
 *
9
 * @package Yandex\Webmaster\Models
10
 */
11
class Host extends Model
12
{
13
    /**
14
     * @var string $id
15
     */
16
    protected $id = null;
17
    /**
18
     * @var string $href
19
     */
20
    protected $href = null;
21
    /**
22
     * @var string $rel
23
     */
24
    protected $rel = null;
25
    /**
26
     * @var string $name
27
     */
28
    protected $name = null;
29
    /**
30
     * @var Verification $verification
31
     */
32
    protected $verification = null;
33
    /**
34
     * @var Crawling $crawling
35
     */
36
    protected $crawling = null;
37
    /**
38
     * @var string $virused
39
     */
40
    protected $virused = null;
41
    /**
42
     * @var string $lastAccess
43
     */
44
    protected $lastAccess = null;
45
    /**
46
     * @var string $tcy
47
     */
48
    protected $tcy = null;
49
    /**
50
     * @var string $urlCount
51
     */
52
    protected $urlCount = null;
53
    /**
54
     * @var string $indexCount
55
     */
56
    protected $indexCount = null;
57
    /**
58
     * @var string $urlErrors
59
     */
60
    protected $urlErrors = null;
61
    /**
62
     * @var string $internalLinksCount
63
     */
64
    protected $internalLinksCount = null;
65
    /**
66
     * @var string $linksCount
67
     */
68
    protected $linksCount = null;
69
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    protected $mappingClasses = [
75
        'verification' => 'Yandex\Webmaster\Models\Verification',
76
        'crawling' => 'Yandex\Webmaster\Models\Crawling',
77
    ];
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    protected $propNameMap = [
83
        'id' => 'id',
84
        'href' => 'href',
85
        'rel' => 'rel',
86
        'name' => 'name',
87
        'verification' => 'verification',
88
        'crawling' => 'crawling',
89
        'virused' => 'virused',
90
        'lastAccess' => 'last-access',
91
        'tcy' => 'tcy',
92
        'urlCount' => 'url-count',
93
        'indexCount' => 'index-count',
94
        'urlErrors' => 'url-errors',
95
        'internalLinksCount' => 'internal-links-count',
96
        'linksCount' => 'links-count',
97
    ];
98
99
    /**
100
     * Host constructor.
101
     *
102
     * @param \SimpleXMLIterator $data
103
     */
104
    public function __construct(\SimpleXMLIterator $data)
105
    {
106
        $this->fromXml($data);
107
    }
108
109
    /**
110
     * @return string|null
111
     */
112
    public function getId()
113
    {
114
        return $this->id;
115
    }
116
117
    /**
118
     * @param string $id
119
     * @return self
120
     */
121
    protected function setId($id)
122
    {
123
        $this->id = $id;
124
125
        return $this;
126
    }
127
128
    /**
129
     * @return string|null
130
     */
131
    public function getHref()
132
    {
133
        return $this->href;
134
    }
135
136
    /**
137
     * @param string $href
138
     * @return self
139
     */
140
    protected function setHref($href)
141
    {
142
        $this->href = $href;
143
144
        return $this;
145
    }
146
147
    /**
148
     * @return string|null
149
     */
150
    public function getRel()
151
    {
152
        return $this->rel;
153
    }
154
155
    /**
156
     *
157
     * @param string $rel
158
     * @return self
159
     */
160
    protected function setRel($rel)
161
    {
162
        $this->rel = $rel;
163
164
        return $this;
165
    }
166
167
    /**
168
     * @return string|null
169
     */
170
    public function getName()
171
    {
172
        return $this->name;
173
    }
174
175
    /**
176
     * @param string $name
177
     * @return self
178
     */
179
    protected function setName($name)
180
    {
181
        $this->name = $name;
182
183
        return $this;
184
    }
185
186
    /**
187
     * @return string|null
188
     */
189
    public function getVerification()
190
    {
191
        return $this->verification;
192
    }
193
194
    /**
195
     * @param Verification $verification
196
     * @return self
197
     */
198
    protected function setVerification(Verification $verification)
199
    {
200
        $this->verification = $verification;
201
202
        return $this;
203
    }
204
205
    /**
206
     * @return Crawling|null
207
     */
208
    public function getCrawling()
209
    {
210
        return $this->crawling;
211
    }
212
213
    /**
214
     * @param Crawling $crawling
215
     * @return self
216
     */
217
    protected function setCrawling(Crawling $crawling)
218
    {
219
        $this->crawling = $crawling;
220
221
        return $this;
222
    }
223
224
    /**
225
     * @return string|null
226
     */
227
    public function getVirused()
228
    {
229
        return $this->virused;
230
    }
231
232
    /**
233
     * @param string $virused
234
     * @return self
235
     */
236
    protected function setVirused($virused)
237
    {
238
        $this->virused = $virused;
239
240
        return $this;
241
    }
242
243
    /**
244
     * @return string
245
     */
246
    public function getLastAccess()
247
    {
248
        return $this->lastAccess;
249
    }
250
251
    /**
252
     * @param string|null $lastAccess
253
     * @return self
254
     */
255
    protected function setLastAccess($lastAccess)
256
    {
257
        $this->lastAccess = $lastAccess;
258
259
        return $this;
260
    }
261
262
    /**
263
     * @return string|null
264
     */
265
    public function getTcy()
266
    {
267
        return $this->tcy;
268
    }
269
270
    /**
271
     * @param string $tcy
272
     * @return self
273
     */
274
    protected function setTcy($tcy)
275
    {
276
        $this->tcy = $tcy;
277
278
        return $this;
279
    }
280
281
    /**
282
     * @return null
283
     */
284
    public function getUrlCount()
285
    {
286
        return $this->urlCount;
287
    }
288
289
    /**
290
     * @param string $urlCount
291
     * @return self
292
     */
293
    protected function setUrlCount($urlCount)
294
    {
295
        $this->urlCount = $urlCount;
296
297
        return $this;
298
    }
299
300
    /**
301
     * @return string|null
302
     */
303
    public function getIndexCount()
304
    {
305
        return $this->indexCount;
306
    }
307
308
    /**
309
     * @param string $indexCount
310
     * @return self
311
     */
312
    protected function setIndexCount($indexCount)
313
    {
314
        $this->indexCount = $indexCount;
315
316
        return $this;
317
    }
318
}
319