spriebsch               Wed May 13 11:08:32 2009 UTC

  Modified files:              
    /phpruntests/src/configuration      rtRuntestsConfiguration.php 
  Log:
  Moved factory method for better readability.
  
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtRuntestsConfiguration.php?r1=1.8&r2=1.9&diff_format=u
Index: phpruntests/src/configuration/rtRuntestsConfiguration.php
diff -u phpruntests/src/configuration/rtRuntestsConfiguration.php:1.8 
phpruntests/src/configuration/rtRuntestsConfiguration.php:1.9
--- phpruntests/src/configuration/rtRuntestsConfiguration.php:1.8       Wed May 
13 01:36:57 2009
+++ phpruntests/src/configuration/rtRuntestsConfiguration.php   Wed May 13 
11:08:32 2009
@@ -46,6 +46,20 @@
         'PhpCommandLineArguments' => 'rtPhpCommandLineArgSetting',
     );
 
+    /**
+     * Factory: returns rtRuntestsConfiguration subclass for the given os.
+     *
+     * @returns rtEnvironment
+     */
+    static public function getInstance ($commandLineArgs, $os = 'Unix')
+    {
+        if ($os == 'Windows') {
+            return new rtWinConfiguration($commandLineArgs);
+        } else {
+            return new rtUnixConfiguration($commandLineArgs);
+        }
+    }
+
     protected function init()
     {
         //parse command line
@@ -58,7 +72,7 @@
     }
 
     /**
-     * @todo spriebsch: is configure() the right name for this method, it 
checks preconditions?
+     *
      */
     public function configure()
     {
@@ -71,28 +85,6 @@
             $object = new $className($this);
             $this->settings[$name] = $object->get();
         }
-       //1 var_dump($this->settings);
-        
-        //check configuration preconditions
-        $preConditionList = rtPreConditionList::getInstance();
-        
-        // $preConditionList->check($this->commandLine, 
$this->environmentVariables);
-        
-        $preConditionList->check($this);
-    }
-
-    /**
-     * Factory: returns rtRuntestsConfiguration subclass for the given os.
-     *
-     * @returns rtEnvironment
-     */
-    static public function getInstance ($commandLineArgs, $os = 'Unix')
-    {
-        if ($os == 'Windows') {
-            return new rtWinConfiguration($commandLineArgs);
-        } else {
-            return new rtUnixConfiguration($commandLineArgs);
-        }
     }
 
     /**



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to