Files can now have mirrors. Implemented SMOMatcher service to attempt to automaticall...
[rock.divinelegy.git] / Domain / Entities / FileFactory.php
1 <?php
2
3 namespace Domain\Entities;
4
5 use Domain\Entities\File;
6
7 interface IFileFactory
8 {
9 public function createInstance(
10 $hash,
11 $path,
12 $filename,
13 $mimetype,
14 $size,
15 $uploadDate,
16 array $mirrors = null
17 );
18 }
19
20 class FileFactory implements IFileFactory
21 {
22 public function createInstance(
23 $hash,
24 $path,
25 $filename,
26 $mimetype,
27 $size,
28 $uploadDate,
29 array $mirrors = null
30 ) {
31 return new File(
32 $hash,
33 $path,
34 $filename,
35 $mimetype,
36 $size,
37 $uploadDate,
38 $mirrors
39 );
40 }
41 }