Artist is allowed to be null.
[rock.divinelegy.git] / Domain / Entities / StepMania / SimfileFactory.php
1 <?php
2
3 namespace Domain\Entities\StepMania;
4
5 use Domain\VOs\StepMania\IArtist;
6 use Domain\VOs\StepMania\IBPM;
7 use Domain\Entities\StepMania\Simfile;
8 use Domain\Entities\IUser;
9 use Domain\Entities\IFile;
10
11 interface ISimfileFactory
12 {
13 public function createInstance(
14 $title,
15 IArtist $artist = null,
16 IUser $uploader,
17 IBPM $bpm,
18 $bpmChanges,
19 $stops,
20 $fgChanges,
21 $bgChanges,
22 IFile $banner,
23 IFile $simfile,
24 $packId = null,
25 array $steps
26 );
27 }
28
29 class SimfileFactory implements ISimfileFactory
30 {
31 public function createInstance(
32 $title,
33 IArtist $artist = null,
34 IUser $uploader,
35 IBPM $bpm,
36 $bpmChanges,
37 $stops,
38 $fgChanges,
39 $bgChanges,
40 IFile $banner = null,
41 IFile $simfile = null,
42 $packId = null,
43 array $steps
44 ) {
45 return new Simfile(
46 $title,
47 $artist,
48 $uploader, //TODO: will be user object
49 $bpm,
50 $bpmChanges,
51 $stops,
52 $fgChanges,
53 $bgChanges,
54 $banner,
55 $simfile,
56 $packId,
57 $steps
58 );
59 }
60 }