1 | <?php |
||
14 | class Feed |
||
15 | { |
||
16 | /** |
||
17 | * Items from this feed come directly from the source. |
||
18 | */ |
||
19 | const SYNDICATION_DIRECT = 1; |
||
20 | |||
21 | /** |
||
22 | * Feed contains items from multiple sources, in an aggregated way. |
||
23 | */ |
||
24 | const SYNDICATION_AGGREGATE = 2; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | * |
||
29 | * @ORM\Column(type="integer") |
||
30 | * @ORM\Id |
||
31 | * @ORM\GeneratedValue(strategy="AUTO") |
||
32 | */ |
||
33 | protected $id; |
||
34 | |||
35 | /** |
||
36 | * The frequency to import the feed with, in hours. |
||
37 | * |
||
38 | * @var int |
||
39 | * |
||
40 | * @ORM\Column(type="integer") |
||
41 | */ |
||
42 | protected $frequency; |
||
43 | |||
44 | /** |
||
45 | * Whether the feed contains all items or only updates. |
||
46 | * |
||
47 | * @var bool |
||
48 | * |
||
49 | * @ORM\Column(type="boolean") |
||
50 | */ |
||
51 | protected $partial; |
||
52 | |||
53 | /** |
||
54 | * Specifies where the feed's items come from. |
||
55 | * Default options are 'direct' and 'aggregate', but these can be extended. |
||
56 | * |
||
57 | * @var int |
||
58 | * |
||
59 | * @ORM\Column(type="smallint") |
||
60 | */ |
||
61 | protected $syndication = self::SYNDICATION_DIRECT; |
||
62 | |||
63 | /** |
||
64 | * One of the configured feed types. |
||
65 | * |
||
66 | * @var string |
||
67 | * |
||
68 | * @ORM\Column(type="string") |
||
69 | */ |
||
70 | protected $type; |
||
71 | |||
72 | /** |
||
73 | * One of the configured reader types. |
||
74 | * |
||
75 | * @var string |
||
76 | * |
||
77 | * @ORM\Column(type="string") |
||
78 | */ |
||
79 | protected $readerType; |
||
80 | |||
81 | /** |
||
82 | * One of the configured importer types. |
||
83 | * |
||
84 | * @var string |
||
85 | * |
||
86 | * @ORM\Column(type="string") |
||
87 | */ |
||
88 | protected $importerType; |
||
89 | |||
90 | /** |
||
91 | * Options to be passed to the feed type. |
||
92 | * |
||
93 | * @var array |
||
94 | * |
||
95 | * @ORM\Column(type="json_array", nullable=true) |
||
96 | */ |
||
97 | protected $options; |
||
98 | |||
99 | /** |
||
100 | * Options to be passed to the feed reader. |
||
101 | * |
||
102 | * @var array |
||
103 | * |
||
104 | * @ORM\Column(type="json_array", nullable=true) |
||
105 | */ |
||
106 | protected $readerOptions; |
||
107 | |||
108 | /** |
||
109 | * Options to be passed to the feed importer. |
||
110 | * |
||
111 | * @var array |
||
112 | * |
||
113 | * @ORM\Column(type="json_array", nullable=true) |
||
114 | */ |
||
115 | protected $importerOptions; |
||
116 | |||
117 | /** |
||
118 | * Configuration to use for downloading the feed. |
||
119 | * |
||
120 | * @var array |
||
121 | * |
||
122 | * @ORM\Column(type="json_array") |
||
123 | */ |
||
124 | protected $transportConfig; |
||
125 | |||
126 | /** |
||
127 | * Can contain key/value pairs to be used as defaults if the feed doesn't supply them. |
||
128 | * |
||
129 | * @var array |
||
130 | * |
||
131 | * @ORM\Column(type="json_array", nullable=true) |
||
132 | */ |
||
133 | protected $defaultValues; |
||
134 | |||
135 | /** |
||
136 | * The feed's origin. |
||
137 | * |
||
138 | * @var OriginInterface |
||
139 | * |
||
140 | * @ORM\ManyToOne(targetEntity="TreeHouse\IoBundle\Model\OriginInterface", inversedBy="feeds", cascade={"persist"}) |
||
141 | */ |
||
142 | protected $origin; |
||
143 | |||
144 | /** |
||
145 | * Sources that were imported using this feed. |
||
146 | * |
||
147 | * @var SourceInterface |
||
148 | * |
||
149 | * @ORM\OneToMany(targetEntity="TreeHouse\IoBundle\Model\SourceInterface", mappedBy="feed", cascade={"persist", "remove"}) |
||
150 | */ |
||
151 | protected $sources; |
||
152 | |||
153 | /** |
||
154 | * A specific supplier (a company, software package, etc.) that's providing this feed. |
||
155 | * |
||
156 | * @var FeedSupplier |
||
157 | * |
||
158 | * @ORM\ManyToOne(targetEntity="FeedSupplier", inversedBy="feeds", cascade={"persist"}) |
||
159 | */ |
||
160 | protected $supplier; |
||
161 | |||
162 | /** |
||
163 | * Imports for this feed. |
||
164 | * |
||
165 | * @var ArrayCollection|Import[] |
||
166 | * |
||
167 | * @ORM\OneToMany(targetEntity="Import", mappedBy="feed", cascade={"persist","remove"}) |
||
168 | */ |
||
169 | protected $imports; |
||
170 | |||
171 | /** |
||
172 | * Constructor. |
||
173 | */ |
||
174 | 4 | public function __construct() |
|
179 | |||
180 | /** |
||
181 | * @return string |
||
182 | */ |
||
183 | public function __toString() |
||
187 | |||
188 | /** |
||
189 | * @return int |
||
190 | */ |
||
191 | 4 | public function getId() |
|
195 | |||
196 | /** |
||
197 | * @param int $frequency |
||
198 | * |
||
199 | * @return $this |
||
200 | */ |
||
201 | 4 | public function setFrequency($frequency) |
|
207 | |||
208 | /** |
||
209 | * @return int |
||
210 | */ |
||
211 | public function getFrequency() |
||
215 | |||
216 | /** |
||
217 | * @param bool $partial |
||
218 | * |
||
219 | * @return $this |
||
220 | */ |
||
221 | 4 | public function setPartial($partial) |
|
227 | |||
228 | /** |
||
229 | * @return bool |
||
230 | */ |
||
231 | 4 | public function isPartial() |
|
235 | |||
236 | /** |
||
237 | * @param int $syndication |
||
238 | * |
||
239 | * @return $this |
||
240 | */ |
||
241 | public function setSyndication($syndication) |
||
247 | |||
248 | /** |
||
249 | * @return int |
||
250 | */ |
||
251 | public function getSyndication() |
||
255 | |||
256 | /** |
||
257 | * @param string $type |
||
258 | * |
||
259 | * @return $this |
||
260 | */ |
||
261 | 4 | public function setType($type) |
|
267 | |||
268 | /** |
||
269 | * @return string |
||
270 | */ |
||
271 | 4 | public function getType() |
|
275 | |||
276 | /** |
||
277 | * @param string $readerType |
||
278 | * |
||
279 | * @return $this |
||
280 | */ |
||
281 | 4 | public function setReaderType($readerType) |
|
287 | |||
288 | /** |
||
289 | * @return string |
||
290 | */ |
||
291 | 4 | public function getReaderType() |
|
295 | |||
296 | /** |
||
297 | * @param string $importerType |
||
298 | * |
||
299 | * @return $this |
||
300 | */ |
||
301 | 4 | public function setImporterType($importerType) |
|
307 | |||
308 | /** |
||
309 | * @return string |
||
310 | */ |
||
311 | 4 | public function getImporterType() |
|
315 | |||
316 | /** |
||
317 | * @param array $options |
||
318 | * |
||
319 | * @return $this |
||
320 | */ |
||
321 | 4 | public function setOptions(array $options = null) |
|
327 | |||
328 | /** |
||
329 | * @return array |
||
330 | */ |
||
331 | 4 | public function getOptions() |
|
335 | |||
336 | /** |
||
337 | * @param array $readerOptions |
||
338 | * |
||
339 | * @return $this |
||
340 | */ |
||
341 | 4 | public function setReaderOptions(array $readerOptions = null) |
|
347 | |||
348 | /** |
||
349 | * @return array |
||
350 | */ |
||
351 | 4 | public function getReaderOptions() |
|
355 | |||
356 | /** |
||
357 | * @param array $importerOptions |
||
358 | * |
||
359 | * @return $this |
||
360 | */ |
||
361 | 4 | public function setImporterOptions(array $importerOptions = null) |
|
367 | |||
368 | /** |
||
369 | * @return array |
||
370 | */ |
||
371 | 4 | public function getImporterOptions() |
|
375 | |||
376 | /** |
||
377 | * @param array $transportConfig |
||
378 | * |
||
379 | * @return $this |
||
380 | */ |
||
381 | 4 | public function setTransportConfig(array $transportConfig) |
|
387 | |||
388 | /** |
||
389 | * @return array |
||
390 | */ |
||
391 | 4 | public function getTransportConfig() |
|
395 | |||
396 | /** |
||
397 | * @param array $defaultValues |
||
398 | * |
||
399 | * @return $this |
||
400 | */ |
||
401 | 4 | public function setDefaultValues(array $defaultValues = null) |
|
407 | |||
408 | /** |
||
409 | * @return array |
||
410 | */ |
||
411 | 4 | public function getDefaultValues() |
|
415 | |||
416 | /** |
||
417 | * @param OriginInterface $origin |
||
418 | * |
||
419 | * @return $this |
||
420 | */ |
||
421 | 4 | public function setOrigin(OriginInterface $origin = null) |
|
427 | |||
428 | /** |
||
429 | * @return OriginInterface |
||
430 | */ |
||
431 | 4 | public function getOrigin() |
|
435 | |||
436 | /** |
||
437 | * @param FeedSupplier $supplier |
||
438 | * |
||
439 | * @return $this |
||
440 | */ |
||
441 | public function setSupplier(FeedSupplier $supplier = null) |
||
447 | |||
448 | /** |
||
449 | * @return FeedSupplier |
||
450 | */ |
||
451 | public function getSupplier() |
||
455 | |||
456 | /** |
||
457 | * @param Import $imports |
||
458 | * |
||
459 | * @return $this |
||
460 | */ |
||
461 | public function addImport(Import $imports) |
||
467 | |||
468 | /** |
||
469 | * @param Import $import |
||
470 | */ |
||
471 | public function removeImport(Import $import) |
||
475 | |||
476 | /** |
||
477 | * @return ArrayCollection|Import[] |
||
478 | */ |
||
479 | public function getImports() |
||
483 | |||
484 | /** |
||
485 | * @param SourceInterface $source |
||
486 | * |
||
487 | * @return $this |
||
488 | */ |
||
489 | public function addSource(SourceInterface $source) |
||
495 | |||
496 | /** |
||
497 | * @param SourceInterface $source |
||
498 | */ |
||
499 | public function removeSource(SourceInterface $source) |
||
503 | |||
504 | /** |
||
505 | * @return SourceInterface[]|ArrayCollection |
||
506 | */ |
||
507 | public function getSources() |
||
511 | } |
||
512 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..