3 namespace Domain\Entities\StepMania
;
5 use Domain\VOs\StepMania\IArtist
;
6 use Domain\VOs\StepMania\IBPM
;
7 use Domain\Entities\IUser
;
8 use Domain\Entities\IFile
;
9 use Domain\Entities\StepMania\ISimfileFactory
;
10 use Domain\Entities\StepMania\ISimfileBuilder
;
12 class SimfileBuilder
implements ISimfileBuilder
14 private $_simfileFactory;
29 public function __construct(ISimfileFactory
$simfileFactory) {
30 $this->_simfileFactory
= $simfileFactory;
33 public function With_Title($title)
35 $this->_title
= $title;
39 public function With_Artist(IArtist
$artist) {
40 $this->_artist
= $artist;
44 public function With_Uploader(IUser
$uploader) {
45 $this->_uploader
= $uploader;
49 public function With_BPM(IBPM
$bpm) {
54 public function With_BpmChanges($const) {
55 $this->_bpmChanges
= $const;
59 public function With_Stops($const) {
60 $this->_stops
= $const;
64 public function With_FgChanges($const) {
65 $this->_fgChanges
= $const;
69 public function With_BgChanges($const) {
70 $this->_bgChanges
= $const;
74 public function With_Banner(IFile
$banner = null
) {
75 $this->_banner
= $banner;
79 public function With_Simfile(IFile
$simfile = null
) {
80 $this->_simfile
= $simfile;
84 public function With_PackId($packId = null
)
86 $this->_packId
= $packId;
90 public function With_Steps(array $steps) {
91 $this->_steps
= $steps;
95 public function build() {
96 return $this->_simfileFactory
97 ->createInstance($this->_title
,