CSPReport::getDocumentUri()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Sockam\CSPLoggerBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Component\Validator\Constraints as Assert;
7
8
/**
9
 * CSPReport.
10
 *
11
 * @ORM\Table(name="c_s_p_report")
12
 * @ORM\Entity(repositoryClass="Sockam\CSPLoggerBundle\Repository\CSPReportRepository")
13
 */
14
class CSPReport
15
{
16
    /**
17
     * @var int
18
     *
19
     * @ORM\Column(name="id", type="integer")
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="AUTO")
22
     */
23
    private $id;
24
25
    /**
26
     * @var string
27
     * @Assert\Url()
28
     * @ORM\Column(name="document_uri", type="string", length=1000)
29
     */
30
    private $documentUri;
31
32
    /**
33
     * @var string
34
     * @Assert\Url()
35
     * @ORM\Column(name="referrer", type="string", length=1000)
36
     */
37
    private $referrer;
38
39
    /**
40
     * @var string
41
     * @Assert\Url()
42
     * @ORM\Column(name="blocked_uri", type="string", length=1000)
43
     */
44
    private $blockedUri;
45
46
    /**
47
     * @var string
48
     *
49
     * @ORM\Column(name="violated_directive", type="string", length=1000)
50
     */
51
    private $violatedDirective;
52
53
    /**
54
     * @var string
55
     *
56
     * @ORM\Column(name="original_policy", type="string", length=1000, nullable=true)
57
     */
58
    private $originalPolicy;
59
60
    /**
61
     * @var \DateTime
62
     *
63
     * @ORM\Column(name="date_received", type="datetime")
64
     */
65
    private $dateReceived;
66
67
    /**
68
     * @var string
69
     * @Assert\Ip
70
     * @ORM\Column(name="sender_ip", type="string", length=255)
71
     */
72
    private $senderIp;
73
74
    /**
75
     * @var string
76
     * @ORM\Column(name="user_agent", type="string", length=1000)
77
     */
78
    private $userAgent;
79
80
    /**
81
     * Get id.
82
     *
83
     * @return int
84
     */
85
    public function getId()
86
    {
87
        return $this->id;
88
    }
89
90
    /**
91
     * Set documentUri.
92
     *
93
     * @param string $documentUri
94
     *
95
     * @return CSPReport
96
     */
97
    public function setDocumentUri($documentUri)
98
    {
99
        $this->documentUri = $documentUri;
100
101
        return $this;
102
    }
103
104
    /**
105
     * Get documentUri.
106
     *
107
     * @return string
108
     */
109
    public function getDocumentUri()
110
    {
111
        return $this->documentUri;
112
    }
113
114
    /**
115
     * Set referrer.
116
     *
117
     * @param string $referrer
118
     *
119
     * @return CSPReport
120
     */
121
    public function setReferrer($referrer)
122
    {
123
        $this->referrer = $referrer;
124
125
        return $this;
126
    }
127
128
    /**
129
     * Get referrer.
130
     *
131
     * @return string
132
     */
133
    public function getReferrer()
134
    {
135
        return $this->referrer;
136
    }
137
138
    /**
139
     * Set blockedUri.
140
     *
141
     * @param string $blockedUri
142
     *
143
     * @return CSPReport
144
     */
145
    public function setBlockedUri($blockedUri)
146
    {
147
        $this->blockedUri = $blockedUri;
148
149
        return $this;
150
    }
151
152
    /**
153
     * Get blockedUri.
154
     *
155
     * @return string
156
     */
157
    public function getBlockedUri()
158
    {
159
        return $this->blockedUri;
160
    }
161
162
    /**
163
     * Set violatedDirective.
164
     *
165
     * @param string $violatedDirective
166
     *
167
     * @return CSPReport
168
     */
169
    public function setViolatedDirective($violatedDirective)
170
    {
171
        $this->violatedDirective = $violatedDirective;
172
173
        return $this;
174
    }
175
176
    /**
177
     * Get violatedDirective.
178
     *
179
     * @return string
180
     */
181
    public function getViolatedDirective()
182
    {
183
        return $this->violatedDirective;
184
    }
185
186
    /**
187
     * Set originalPolicy.
188
     *
189
     * @param string $originalPolicy
190
     *
191
     * @return CSPReport
192
     */
193
    public function setOriginalPolicy($originalPolicy)
194
    {
195
        $this->originalPolicy = $originalPolicy;
196
197
        return $this;
198
    }
199
200
    /**
201
     * Get originalPolicy.
202
     *
203
     * @return string
204
     */
205
    public function getOriginalPolicy()
206
    {
207
        return $this->originalPolicy;
208
    }
209
210
    /**
211
     * Set dateReceived.
212
     *
213
     * @param \DateTime $dateReceived
214
     *
215
     * @return CSPReport
216
     */
217
    public function setDateReceived($dateReceived)
218
    {
219
        $this->dateReceived = $dateReceived;
220
221
        return $this;
222
    }
223
224
    /**
225
     * Get dateReceived.
226
     *
227
     * @return \DateTime
228
     */
229
    public function getDateReceived()
230
    {
231
        return $this->dateReceived;
232
    }
233
234
    /**
235
     * Set senderIp.
236
     *
237
     * @param string $senderIp
238
     *
239
     * @return CSPReport
240
     */
241
    public function setSenderIp($senderIp)
242
    {
243
        $this->senderIp = $senderIp;
244
245
        return $this;
246
    }
247
248
    /**
249
     * Get senderIp.
250
     *
251
     * @return string
252
     */
253
    public function getSenderIp()
254
    {
255
        return $this->senderIp;
256
    }
257
258
    /**
259
     * Set userAgent.
260
     *
261
     * @param string $userAgent
262
     *
263
     * @return CSPReport
264
     */
265
    public function setUserAgent($userAgent)
266
    {
267
        $this->userAgent = $userAgent;
268
269
        return $this;
270
    }
271
272
    /**
273
     * Get userAgent.
274
     *
275
     * @return string
276
     */
277
    public function getUserAgent()
278
    {
279
        return $this->userAgent;
280
    }
281
}
282