3 namespace Domain\Entities\StepMania
;
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
;
11 interface ISimfileStepByStepBuilder
13 public function With_Title($title);
16 interface ISimfileStepByStepBuilder_With_Title
18 public function With_Artist(IArtist
$artist);
21 interface ISimfileStepByStepBuilder_With_Artist
23 public function With_Uploader(IUser
$uploader);
26 interface ISimfileStepByStepBuilder_With_Uploader
28 public function With_BPM(IBPM
$bpm);
31 interface ISimfileStepByStepBuilder_With_BPM
33 public function With_BpmChanges($const);
36 interface ISimfileStepByStepBuilder_With_BpmChanges
38 public function With_Stops($const);
41 interface ISimfileStepByStepBuilder_With_Stops
43 public function With_FgChanges($const);
46 interface ISimfileStepByStepBuilder_With_FgChanges
48 public function With_BgChanges($const);
51 interface ISimfileStepByStepBuilder_With_BgChanges
53 public function With_Steps(array $steps);
56 interface ISimfileStepByStepBuilder_With_Steps
58 public function With_Banner(IFile
$banner = null
);
59 public function With_Simfile(IFile
$simfile = null
);
60 public function With_PackId($packId = null
);
61 public function build();
65 abstract class AbstractSimfileStepByStepBuilder
67 /* @var $_simfileBuilder Domain\Entities\StepMania\ISimfileBuilder */
68 protected $_simfileBuilder;
70 public function __construct(ISimfileBuilder
$builder)
72 $this->_simfileBuilder
= $builder;
77 class SimfileStepByStepBuilder
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder
79 public function With_Title($title)
81 $this->_simfileBuilder
->With_Title($title);
82 return new SimfileStepByStepBuilder_With_Title($this->_simfileBuilder
);
86 class SimfileStepByStepBuilder_With_Title
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_Title
88 public function With_Artist(IArtist
$artist)
90 $this->_simfileBuilder
->With_Artist($artist);
91 return new SimfileStepByStepBuilder_With_Artist($this->_simfileBuilder
);
95 class SimfileStepByStepBuilder_With_Artist
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_Artist
97 public function With_Uploader(IUser
$uploader)
99 $this->_simfileBuilder
->With_Uploader($uploader);
100 return new SimfileStepByStepBuilder_With_Uploader($this->_simfileBuilder
);
104 class SimfileStepByStepBuilder_With_Uploader
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_Uploader
106 public function With_BPM(IBPM
$bpm)
108 $this->_simfileBuilder
->With_BPM($bpm);
109 return new SimfileStepByStepBuilder_With_BPM($this->_simfileBuilder
);
113 class SimfileStepByStepBuilder_With_BPM
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_BPM
115 public function With_BpmChanges($const)
117 $this->_simfileBuilder
->With_BpmChanges($const);
118 return new SimfileStepByStepBuilder_With_BpmChanges($this->_simfileBuilder
);
122 class SimfileStepByStepBuilder_With_BpmChanges
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_BpmChanges
124 public function With_Stops($const) {
125 $this->_simfileBuilder
->With_Stops($const);
126 return new SimfileStepByStepBuilder_With_Stops($this->_simfileBuilder
);
130 class SimfileStepByStepBuilder_With_Stops
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_Stops
132 public function With_FgChanges($const)
134 $this->_simfileBuilder
->With_FgChanges($const);
135 return new SimfileStepByStepBuilder_With_FgChanges($this->_simfileBuilder
);
139 class SimfileStepByStepBuilder_With_FgChanges
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_FgChanges
141 public function With_BgChanges($const)
143 $this->_simfileBuilder
->With_BgChanges($const);
144 return new SimfileStepByStepBuilder_With_BgChanges($this->_simfileBuilder
);
148 class SimfileStepByStepBuilder_With_BgChanges
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_BgChanges
150 public function With_Steps(array $steps)
152 $this->_simfileBuilder
->With_Steps($steps);
153 return new SimfileStepByStepBuilder_With_Steps($this->_simfileBuilder
);
157 class SimfileStepByStepBuilder_With_Steps
extends AbstractSimfileStepByStepBuilder
implements ISimfileStepByStepBuilder_With_Steps
159 public function With_Banner(IFile
$banner = null
)
161 $this->_simfileBuilder
->With_Banner($banner);
162 return new SimfileStepByStepBuilder_With_Steps($this->_simfileBuilder
); //TODO: Pretty sure return $this will be OK
165 public function With_Simfile(IFile
$simfile = null
)
167 $this->_simfileBuilder
->With_Simfile($simfile);
168 return new SimfileStepByStepBuilder_With_Steps($this->_simfileBuilder
);
171 public function With_PackId($packId = null
)
173 $this->_simfileBuilder
->With_PackId($packId);
174 return new SimfileStepByStepBuilder_With_Steps($this->_simfileBuilder
);
177 public function build()
179 return $this->_simfileBuilder