Pack entity builder stuff. Not tested yet.
[rock.divinelegy.git] / Domain / Entities / StepMania / SimfileStepByStepBuilder.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\ISimfileBuilder;
8 use Domain\Entities\IUser;
9 use Domain\Entities\IFile;
10
11 interface ISimfileStepByStepBuilder
12 {
13 public function With_Title($title);
14 }
15
16 interface ISimfileStepByStepBuilder_With_Title
17 {
18 public function With_Artist(IArtist $artist);
19 }
20
21 interface ISimfileStepByStepBuilder_With_Artist
22 {
23 public function With_Uploader(IUser $uploader);
24 }
25
26 interface ISimfileStepByStepBuilder_With_Uploader
27 {
28 public function With_BPM(IBPM $bpm);
29 }
30
31 interface ISimfileStepByStepBuilder_With_BPM
32 {
33 public function With_BpmChanges($const);
34 }
35
36 interface ISimfileStepByStepBuilder_With_BpmChanges
37 {
38 public function With_Stops($const);
39 }
40
41 interface ISimfileStepByStepBuilder_With_Stops
42 {
43 public function With_FgChanges($const);
44 }
45
46 interface ISimfileStepByStepBuilder_With_FgChanges
47 {
48 public function With_BgChanges($const);
49 }
50
51 interface ISimfileStepByStepBuilder_With_BgChanges
52 {
53 public function With_Steps(array $steps);
54 }
55
56 interface ISimfileStepByStepBuilder_With_Steps
57 {
58 public function With_Banner(IFile $banner);
59 public function With_Simfile(IFile $simfile);
60 public function build();
61 }
62
63
64 abstract class AbstractSimfileStepByStepBuilder
65 {
66 /* @var $_simfileBuilder Domain\Entities\StepMania\ISimfileBuilder */
67 protected $_simfileBuilder;
68
69 public function __construct(ISimfileBuilder $builder)
70 {
71 $this->_simfileBuilder = $builder;
72 }
73 }
74
75
76 class SimfileStepByStepBuilder extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder
77 {
78 public function With_Title($title)
79 {
80 $this->_simfileBuilder->With_Title($title);
81 return new SimfileStepByStepBuilder_With_Title($this->_simfileBuilder);
82 }
83 }
84
85 class SimfileStepByStepBuilder_With_Title extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_Title
86 {
87 public function With_Artist(IArtist $artist)
88 {
89 $this->_simfileBuilder->With_Artist($artist);
90 return new SimfileStepByStepBuilder_With_Artist($this->_simfileBuilder);
91 }
92 }
93
94 class SimfileStepByStepBuilder_With_Artist extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_Artist
95 {
96 public function With_Uploader(IUser $uploader)
97 {
98 $this->_simfileBuilder->With_Uploader($uploader);
99 return new SimfileStepByStepBuilder_With_Uploader($this->_simfileBuilder);
100 }
101 }
102
103 class SimfileStepByStepBuilder_With_Uploader extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_Uploader
104 {
105 public function With_BPM(IBPM $bpm)
106 {
107 $this->_simfileBuilder->With_BPM($bpm);
108 return new SimfileStepByStepBuilder_With_BPM($this->_simfileBuilder);
109 }
110 }
111
112 class SimfileStepByStepBuilder_With_BPM extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_BPM
113 {
114 public function With_BpmChanges($const)
115 {
116 $this->_simfileBuilder->With_BpmChanges($const);
117 return new SimfileStepByStepBuilder_With_BpmChanges($this->_simfileBuilder);
118 }
119 }
120
121 class SimfileStepByStepBuilder_With_BpmChanges extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_BpmChanges
122 {
123 public function With_Stops($const) {
124 $this->_simfileBuilder->With_Stops($const);
125 return new SimfileStepByStepBuilder_With_Stops($this->_simfileBuilder);
126 }
127 }
128
129 class SimfileStepByStepBuilder_With_Stops extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_Stops
130 {
131 public function With_FgChanges($const)
132 {
133 $this->_simfileBuilder->With_FgChanges($const);
134 return new SimfileStepByStepBuilder_With_FgChanges($this->_simfileBuilder);
135 }
136 }
137
138 class SimfileStepByStepBuilder_With_FgChanges extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_FgChanges
139 {
140 public function With_BgChanges($const)
141 {
142 $this->_simfileBuilder->With_BgChanges($const);
143 return new SimfileStepByStepBuilder_With_BgChanges($this->_simfileBuilder);
144 }
145 }
146
147 class SimfileStepByStepBuilder_With_BgChanges extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_BgChanges
148 {
149 public function With_Steps(array $steps)
150 {
151 $this->_simfileBuilder->With_Steps($steps);
152 return new SimfileStepByStepBuilder_With_Steps($this->_simfileBuilder);
153 }
154 }
155
156 class SimfileStepByStepBuilder_With_Steps extends AbstractSimfileStepByStepBuilder implements ISimfileStepByStepBuilder_With_Steps
157 {
158 public function With_Banner(IFile $banner)
159 {
160 $this->_simfileBuilder->With_Banner($banner);
161 return new SimfileStepByStepBuilder_With_Steps($this->_simfileBuilder);
162 }
163
164 public function With_Simfile(IFile $simfile)
165 {
166 $this->_simfileBuilder->With_Simfile($simfile);
167 return new SimfileStepByStepBuilder_With_Steps($this->_simfileBuilder);
168 }
169
170 public function build()
171 {
172 return $this->_simfileBuilder
173 ->build();
174 }
175 }