Completed
Pull Request — master (#162)
by
unknown
06:39
created

Host::getLastAccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
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
     * {@inheritdoc}
72
     */
73
    protected $mappingClasses = [
74
        'verification' => 'Yandex\Webmaster\Models\Verification',
75
        'crawling' => 'Yandex\Webmaster\Models\Crawling',
76
    ];
77
78
    /**
79
     * {@inheritdoc}
80
     */
81
    protected $propNameMap = [
82
        'lastAccess' => 'last-access',
83
        'urlCount' => 'url-count',
84
        'indexCount' => 'index-count',
85
        'urlErrors' => 'url-errors',
86
        'internalLinksCount' => 'internal-links-count',
87
        'linksCount' => 'links-count',
88
    ];
89
90
    /**
91
     * Host constructor.
92
     *
93
     * @param \SimpleXMLIterator $data
94
     */
95
    public function __construct(\SimpleXMLIterator $data)
96
    {
97
        $this->fromXml($data);
98
    }
99
100
    /**
101
     * @return string|null
102
     */
103
    public function getId()
104
    {
105
        return $this->id;
106
    }
107
108
    /**
109
     * @param string $id
110
     * @return self
111
     */
112
    public function setId($id)
113
    {
114
        $this->id = $id;
115
116
        return $this;
117
    }
118
119
    /**
120
     * @return string|null
121
     */
122
    public function getHref()
123
    {
124
        return $this->href;
125
    }
126
127
    /**
128
     * @param string $href
129
     * @return self
130
     */
131
    public function setHref($href)
132
    {
133
        $this->href = $href;
134
135
        return $this;
136
    }
137
138
    /**
139
     * @return string|null
140
     */
141
    public function getRel()
142
    {
143
        return $this->rel;
144
    }
145
146
    /**
147
     *
148
     * @param string $rel
149
     * @return self
150
     */
151
    public function setRel($rel)
152
    {
153
        $this->rel = $rel;
154
155
        return $this;
156
    }
157
158
    /**
159
     * @return string|null
160
     */
161
    public function getName()
162
    {
163
        return $this->name;
164
    }
165
166
    /**
167
     * @param string $name
168
     * @return self
169
     */
170
    public function setName($name)
171
    {
172
        $this->name = $name;
173
174
        return $this;
175
    }
176
177
    /**
178
     * @return string|null
179
     */
180
    public function getVerification()
181
    {
182
        return $this->verification;
183
    }
184
185
    /**
186
     * @param Verification $verification
187
     * @return self
188
     */
189
    public function setVerification(Verification $verification)
190
    {
191
        $this->verification = $verification;
192
193
        return $this;
194
    }
195
196
    /**
197
     * @return Crawling|null
198
     */
199
    public function getCrawling()
200
    {
201
        return $this->crawling;
202
    }
203
204
    /**
205
     * @param Crawling $crawling
206
     * @return self
207
     */
208
    public function setCrawling(Crawling $crawling)
209
    {
210
        $this->crawling = $crawling;
211
212
        return $this;
213
    }
214
215
    /**
216
     * @return string|null
217
     */
218
    public function getVirused()
219
    {
220
        return $this->virused;
221
    }
222
223
    /**
224
     * @param string $virused
225
     * @return self
226
     */
227
    public function setVirused($virused)
228
    {
229
        $this->virused = $virused;
230
231
        return $this;
232
    }
233
234
    /**
235
     * @return string
236
     */
237
    public function getLastAccess()
238
    {
239
        return $this->lastAccess;
240
    }
241
242
    /**
243
     * @param string|null $lastAccess
244
     * @return self
245
     */
246
    public function setLastAccess($lastAccess)
247
    {
248
        $this->lastAccess = $lastAccess;
249
250
        return $this;
251
    }
252
253
    /**
254
     * @return string|null
255
     */
256
    public function getTcy()
257
    {
258
        return $this->tcy;
259
    }
260
261
    /**
262
     * @param string $tcy
263
     * @return self
264
     */
265
    public function setTcy($tcy)
266
    {
267
        $this->tcy = $tcy;
268
269
        return $this;
270
    }
271
272
    /**
273
     * @return null
274
     */
275
    public function getUrlCount()
276
    {
277
        return $this->urlCount;
278
    }
279
280
    /**
281
     * @param string $urlCount
282
     * @return self
283
     */
284
    public function setUrlCount($urlCount)
285
    {
286
        $this->urlCount = $urlCount;
287
288
        return $this;
289
    }
290
291
    /**
292
     * @return string|null
293
     */
294
    public function getIndexCount()
295
    {
296
        return $this->indexCount;
297
    }
298
299
    /**
300
     * @param string $indexCount
301
     * @return self
302
     */
303
    public function setIndexCount($indexCount)
304
    {
305
        $this->indexCount = $indexCount;
306
307
        return $this;
308
    }
309
}
310