1 | <?php |
||
17 | abstract class AbstractSource implements SourceInterface |
||
18 | { |
||
19 | /** |
||
20 | * Source ID. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $sourceId; |
||
25 | |||
26 | /** |
||
27 | * Is raw? |
||
28 | * |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $isRaw; |
||
32 | |||
33 | /** |
||
34 | * Content. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $content; |
||
39 | |||
40 | /** |
||
41 | * Formatted content. |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $formattedContent; |
||
46 | |||
47 | /** |
||
48 | * Data. |
||
49 | * |
||
50 | * @var Data |
||
51 | */ |
||
52 | protected $data; |
||
53 | |||
54 | /** |
||
55 | * Has changed? |
||
56 | * |
||
57 | * @var bool |
||
58 | */ |
||
59 | protected $hasChanged; |
||
60 | |||
61 | /** |
||
62 | * Permalink. |
||
63 | * |
||
64 | * @var Permalink |
||
65 | */ |
||
66 | protected $permalink; |
||
67 | |||
68 | /** |
||
69 | * File. |
||
70 | * |
||
71 | * @var \SplFileInfo |
||
72 | */ |
||
73 | protected $file; |
||
74 | |||
75 | /** |
||
76 | * Relative pathname. |
||
77 | * |
||
78 | * @var string |
||
79 | */ |
||
80 | protected $relativePathname; |
||
81 | |||
82 | /** |
||
83 | * Filename. |
||
84 | * |
||
85 | * @var string |
||
86 | */ |
||
87 | protected $filename; |
||
88 | |||
89 | /** |
||
90 | * Use file reference? |
||
91 | * |
||
92 | * @var bool |
||
93 | */ |
||
94 | protected $useFileReference = false; |
||
95 | |||
96 | /** |
||
97 | * Can be formatted? |
||
98 | * |
||
99 | * @var bool |
||
100 | */ |
||
101 | protected $canBeFormatted = false; |
||
102 | |||
103 | /** |
||
104 | * Is a generator? |
||
105 | * |
||
106 | * @var bool |
||
107 | */ |
||
108 | protected $isGenerator = false; |
||
109 | |||
110 | /** |
||
111 | * Is generated? |
||
112 | * |
||
113 | * @var bool |
||
114 | */ |
||
115 | protected $isGenerated = false; |
||
116 | |||
117 | /** |
||
118 | * Should be skipped? |
||
119 | * |
||
120 | * @var bool |
||
121 | */ |
||
122 | protected $shouldBeSkipped = false; |
||
123 | |||
124 | /** |
||
125 | * Initialize source. |
||
126 | * |
||
127 | * @param bool $hasChanged Has the Source changed? |
||
128 | */ |
||
129 | 6 | protected function init($hasChanged = null) |
|
136 | |||
137 | /** |
||
138 | * {@inheritdoc} |
||
139 | */ |
||
140 | 3 | public function sourceId() |
|
144 | |||
145 | /** |
||
146 | * {@inheritdoc} |
||
147 | */ |
||
148 | public function isRaw() |
||
152 | |||
153 | /** |
||
154 | * {@inheritdoc} |
||
155 | */ |
||
156 | public function content() |
||
160 | |||
161 | /** |
||
162 | * {@inheritdoc} |
||
163 | */ |
||
164 | public function setContent($content = null) |
||
172 | |||
173 | /** |
||
174 | * {@inheritdoc} |
||
175 | */ |
||
176 | public function formattedContent() |
||
180 | |||
181 | /** |
||
182 | * {@inheritdoc} |
||
183 | */ |
||
184 | public function setFormattedContent($formattedContent = null) |
||
188 | |||
189 | /** |
||
190 | * {@inheritdoc} |
||
191 | */ |
||
192 | 8 | public function data() |
|
196 | |||
197 | /** |
||
198 | * {@inheritdoc} |
||
199 | */ |
||
200 | public function hasChanged() |
||
204 | |||
205 | /** |
||
206 | * {@inheritdoc} |
||
207 | */ |
||
208 | public function setHasChanged() |
||
212 | |||
213 | /** |
||
214 | * {@inheritdoc} |
||
215 | */ |
||
216 | public function setHasNotChanged() |
||
220 | |||
221 | /** |
||
222 | * {@inheritdoc} |
||
223 | */ |
||
224 | public function permalink() |
||
228 | |||
229 | /** |
||
230 | * {@inheritdoc} |
||
231 | */ |
||
232 | public function setPermalink(Permalink $permalink) |
||
236 | |||
237 | /** |
||
238 | * {@inheritdoc} |
||
239 | */ |
||
240 | public function useFileReference() |
||
244 | |||
245 | /** |
||
246 | * {@inheritdoc} |
||
247 | */ |
||
248 | 4 | public function canBeFormatted() |
|
252 | |||
253 | /** |
||
254 | * {@inheritdoc} |
||
255 | */ |
||
256 | public function isGenerator() |
||
260 | |||
261 | /** |
||
262 | * {@inheritdoc} |
||
263 | */ |
||
264 | public function setIsGenerator() |
||
268 | |||
269 | /** |
||
270 | * {@inheritdoc} |
||
271 | */ |
||
272 | public function setIsNotGenerator() |
||
276 | |||
277 | /** |
||
278 | * {@inheritdoc} |
||
279 | */ |
||
280 | public function isGenerated() |
||
284 | |||
285 | /** |
||
286 | * {@inheritdoc} |
||
287 | */ |
||
288 | public function setIsGenerated() |
||
292 | |||
293 | /** |
||
294 | * {@inheritdoc} |
||
295 | */ |
||
296 | public function setIsNotGenerated() |
||
300 | |||
301 | /** |
||
302 | * {@inheritdoc} |
||
303 | */ |
||
304 | public function shouldBeSkipped() |
||
308 | |||
309 | /** |
||
310 | * {@inheritdoc} |
||
311 | */ |
||
312 | public function setShouldBeSkipped() |
||
316 | |||
317 | /** |
||
318 | * {@inheritdoc} |
||
319 | */ |
||
320 | public function setShouldNotBeSkipped() |
||
324 | |||
325 | /** |
||
326 | * {@inheritdoc} |
||
327 | */ |
||
328 | public function forceReprocess() |
||
332 | |||
333 | /** |
||
334 | * {@inheritdoc} |
||
335 | */ |
||
336 | 7 | public function relativePathname() |
|
340 | |||
341 | /** |
||
342 | * {@inheritdoc} |
||
343 | */ |
||
344 | public function filename() |
||
348 | |||
349 | /** |
||
350 | * {@inheritdoc} |
||
351 | */ |
||
352 | public function file() |
||
356 | |||
357 | /** |
||
358 | * {@inheritdoc} |
||
359 | */ |
||
360 | public function url() |
||
364 | |||
365 | /** |
||
366 | * {@inheritdoc} |
||
367 | */ |
||
368 | public function duplicate($newSourceId, array $options = []) |
||
383 | } |
||
384 |