[CLEANUP] Adjust code to coding guidelines
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Functional / Domain / Model / Fixture / FileContext.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Tests\Functional\Domain\Model\Fixture;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2012 Oliver Hader <oliver.hader@typo3.org>
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26 /**
27 * A file context object (File Abstraction Layer)
28 *
29 * @api
30 */
31 class FileContext extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
32
33 /**
34 * @var \TYPO3\CMS\Extbase\Domain\Model\File
35 */
36 protected $file;
37
38 /**
39 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\File>
40 */
41 protected $files;
42
43 /**
44 * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
45 */
46 protected $fileReference;
47
48 /**
49 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
50 */
51 protected $fileReferences;
52
53 /**
54 * @var \TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection
55 */
56 protected $staticFileCollection;
57
58 /**
59 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection>
60 */
61 protected $staticFileCollections;
62
63 /**
64 * @var \TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection
65 */
66 protected $folderBasedFileCollection;
67
68 /**
69 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection>
70 */
71 protected $folderBasedFileCollections;
72
73 /**
74 * @var \TYPO3\CMS\Extbase\Domain\Model\Folder
75 */
76 protected $folder;
77
78 /**
79 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Folder>
80 */
81 protected $folders;
82
83 public function __construct() {
84 $this->files = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
85 $this->fileReferences = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
86 $this->staticFileCollections = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
87 $this->folderBasedFileCollections = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
88 $this->folders = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
89 }
90
91 /**
92 * FILE
93 */
94 /**
95 * @return \TYPO3\CMS\Extbase\Domain\Model\File
96 */
97 public function getFile() {
98 return $this->file;
99 }
100
101 /**
102 * @param \TYPO3\CMS\Extbase\Domain\Model\File $file
103 */
104 public function setFile(\TYPO3\CMS\Extbase\Domain\Model\File $file) {
105 $this->file = $file;
106 }
107
108 /**
109 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\File>
110 */
111 public function getFiles() {
112 return $this->files;
113 }
114
115 /**
116 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\File> $files
117 */
118 public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) {
119 $this->files = $files;
120 }
121
122 /**
123 * @param \TYPO3\CMS\Extbase\Domain\Model\File $file
124 */
125 public function addFile(\TYPO3\CMS\Extbase\Domain\Model\File $file) {
126 $this->files->attach($file);
127 }
128
129 /**
130 * @param \TYPO3\CMS\Extbase\Domain\Model\File $file
131 */
132 public function removeFile(\TYPO3\CMS\Extbase\Domain\Model\File $file) {
133 $this->files->detach($file);
134 }
135
136 /**
137 * COLLECTION
138 */
139 /**
140 * @return \TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection
141 */
142 public function getStaticFileCollection() {
143 return $this->staticFileCollection;
144 }
145
146 /**
147 * @param \TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection $staticFileCollection
148 */
149 public function setStaticFileCollection(\TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection $staticFileCollection) {
150 $this->staticFileCollection = $staticFileCollection;
151 }
152
153 /**
154 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection>
155 */
156 public function getStaticFileCollections() {
157 return $this->staticFileCollections;
158 }
159
160 /**
161 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection> $staticFileCollections
162 */
163 public function setStaticFileCollections(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $staticFileCollections) {
164 $this->staticFileCollections = $staticFileCollections;
165 }
166
167 /**
168 * @param \TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection $staticFileCollection
169 */
170 public function addStaticFileCollection(\TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection $staticFileCollection) {
171 $this->staticFileCollections->attach($staticFileCollection);
172 }
173
174 /**
175 * @param \TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection $staticFileCollection
176 */
177 public function removeStaticFileCollection(\TYPO3\CMS\Extbase\Domain\Model\StaticFileCollection $staticFileCollection) {
178 $this->staticFileCollections->detach($staticFileCollection);
179 }
180
181 /**
182 * @return \TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection
183 */
184 public function getFolderBasedFileCollection() {
185 return $this->folderBasedFileCollection;
186 }
187
188 /**
189 * @param \TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection $folderBasedFileCollection
190 */
191 public function setFolderBasedFileCollection(\TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection $folderBasedFileCollection) {
192 $this->folderBasedFileCollection = $folderBasedFileCollection;
193 }
194
195 /**
196 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection>
197 */
198 public function getFolderBasedFileCollections() {
199 return $this->folderBasedFileCollections;
200 }
201
202 /**
203 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection> $folderBasedFileCollections
204 */
205 public function setFolderBasedFileCollections(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $folderBasedFileCollections) {
206 $this->folderBasedFileCollections = $folderBasedFileCollections;
207 }
208
209 /**
210 * @param \TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection $folderBasedFileCollection
211 */
212 public function addFolderBasedFileCollection(\TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection $folderBasedFileCollection) {
213 $this->folderBasedFileCollections->attach($folderBasedFileCollection);
214 }
215
216 /**
217 * @param \TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection $folderBasedFileCollection
218 */
219 public function removeFolderBasedFileCollection(\TYPO3\CMS\Extbase\Domain\Model\FolderBasedFileCollection $folderBasedFileCollection) {
220 $this->folderBasedFileCollections->detach($folderBasedFileCollection);
221 }
222
223 /**
224 * REFERENCE
225 */
226 /**
227 * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference
228 */
229 public function getFileReference() {
230 return $this->fileReference;
231 }
232
233 /**
234 * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileReference
235 */
236 public function setFileReference(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileReference) {
237 $this->fileReference = $fileReference;
238 }
239
240 /**
241 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
242 */
243 public function getFileReferences() {
244 return $this->fileReferences;
245 }
246
247 /**
248 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $fileReferences
249 */
250 public function setFileReferences(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $fileReferences) {
251 $this->fileReferences = $fileReferences;
252 }
253
254 /**
255 * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileReference
256 */
257 public function addFileReference(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileReference) {
258 $this->fileReferences->attach($fileReference);
259 }
260
261 /**
262 * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileReference
263 */
264 public function removeFileReference(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileReference) {
265 $this->fileReferences->detach($fileReference);
266 }
267
268 /**
269 * FOLDER
270 */
271 /**
272 * @return \TYPO3\CMS\Extbase\Domain\Model\Folder
273 */
274 public function getFolder() {
275 return $this->folder;
276 }
277
278 /**
279 * @param \TYPO3\CMS\Extbase\Domain\Model\Folder $folder
280 */
281 public function setFolder(\TYPO3\CMS\Extbase\Domain\Model\Folder $folder) {
282 $this->folder = $folder;
283 }
284
285 /**
286 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Folder>
287 */
288 public function getFolders() {
289 return $this->folders;
290 }
291
292 /**
293 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Folder> $folders
294 */
295 public function setFolders(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $folders) {
296 $this->folders = $folders;
297 }
298
299 /**
300 * @param \TYPO3\CMS\Extbase\Domain\Model\Folder $folder
301 */
302 public function addFolder(\TYPO3\CMS\Extbase\Domain\Model\Folder $folder) {
303 $this->folders->attach($folder);
304 }
305
306 /**
307 * @param \TYPO3\CMS\Extbase\Domain\Model\Folder $folder
308 */
309 public function removeFolder(\TYPO3\CMS\Extbase\Domain\Model\Folder $folder) {
310 $this->folders->detach($folder);
311 }
312 }
313
314 ?>