Work on making country nullable. Presently the datamapper cant deal with it though...
[rock.divinelegy.git] / Domain / Entities / UserStepByStepBuilder.php
index 6f8d55c..e94c05d 100644 (file)
@@ -7,11 +7,6 @@ use Domain\VOs\IName;
 \r
 interface IUserStepByStepBuilder\r
 {\r
-    public function With_Country(ICountry $country);\r
-}\r
-\r
-interface IUserStepByStepBuilder_With_Country\r
-{\r
     public function With_DisplayName($name);\r
 }\r
 \r
@@ -38,6 +33,7 @@ interface IUserStepByStepBuilder_With_FacebookId
 interface IUserStepByStepBuilder_With_Quota\r
 {\r
     public function With_YearsStepArtist($years); //not going to make this mandatory as it is kind of a joke\r
+    public function With_Country(ICountry $country = null);\r
     public function build();\r
 }\r
     \r
@@ -53,14 +49,6 @@ abstract class AbstractUserStepByStepBuilder
 \r
 class UserStepByStepBuilder extends AbstractUserStepByStepBuilder implements IUserStepByStepBuilder\r
 {\r
-    public function With_Country(ICountry $country) {\r
-        $this->_userBuilder->With_Country($country);\r
-        return new UserStepByStepBuilder_With_Country($this->_userBuilder);\r
-    }\r
-}\r
-\r
-class UserStepByStepBuilder_With_Country extends AbstractUserStepByStepBuilder implements IUserStepByStepBuilder_With_Country\r
-{\r
     public function With_DisplayName($name) {\r
         $this->_userBuilder->With_DisplayName($name);\r
         return new UserStepByStepBuilder_With_DisplayName($this->_userBuilder);\r
@@ -107,6 +95,11 @@ class UserStepByStepBuilder_With_Quota extends AbstractUserStepByStepBuilder imp
         return $this;\r
     }\r
     \r
+    public function With_Country(ICountry $country = null) {\r
+        $this->_userBuilder->With_Country($country);\r
+        return $this;\r
+    }\r
+\r
     public function build() {\r
         return $this->_userBuilder\r
                     ->build();\r