Progress on #1. Still need to implement domain objects for Artist, bpm etc but at...
authorCameron Ball <c.ball1729@gmail.com>
Tue, 10 Jun 2014 15:25:23 +0000 (23:25 +0800)
committerCameron Ball <c.ball1729@gmail.com>
Tue, 10 Jun 2014 15:25:23 +0000 (23:25 +0800)
public_html/vendor/DivinElegy/Artists.php [new file with mode: 0644]
public_html/vendor/DivinElegy/Simfile.php [new file with mode: 0644]

diff --git a/public_html/vendor/DivinElegy/Artists.php b/public_html/vendor/DivinElegy/Artists.php
new file mode 100644 (file)
index 0000000..4df79b2
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+namespace DivinElegy;
+
+class Artist
+{
+    
+}
\ No newline at end of file
diff --git a/public_html/vendor/DivinElegy/Simfile.php b/public_html/vendor/DivinElegy/Simfile.php
new file mode 100644 (file)
index 0000000..001ac99
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+namespace DivinElegy;
+
+class Simfile
+{
+    //str - simfile title
+    protected $title;
+    
+    //obj - reerence to song artist
+    protected $artist;
+    
+    //obj - reference to uploader
+    protected $uploader;
+    
+    //obj - reference to bpm object
+    protected $bpm;
+    
+    //bool - does the chart have stops
+    protected $stops;
+    
+    //bool - does the chart have fgChanges
+    protected $fgChanges;
+    
+    //bool - does the charg have bgChanges
+    protected $bgChanges;
+    
+    public function __construct($title)
+    {
+        $this->setTitle($title);
+    }
+    
+    protected function setTitle($title) 
+    {
+        if (empty($title))
+        {
+            throw new \InvalidArgumentException('Simfile title cannot be empty');
+        }
+        
+        $this->title = $title;
+    }
+    
+    public function setArtist(Artist $artist)
+    {
+        $this->artist = $artist;
+    }
+}