]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/main/factories/objects/class_ObjectFactory.php
Code base synced
[mailer.git] / inc / classes / main / factories / objects / class_ObjectFactory.php
index 9a2ec9c2d2c9958191c6af7bf2a415dc0e39e255..0848e79fabd832f0405555e47de65481b1629c57 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -35,12 +35,6 @@ class ObjectFactory extends BaseFactory {
        protected function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
-
-               // Set object description
-               $this->setObjectDescription("Simple generic object factory");
-
-               // Create unique ID number
-               $this->generateUniqueId();
        }
 
        /**
@@ -70,14 +64,13 @@ class ObjectFactory extends BaseFactory {
                        throw new ClassNotFoundException(array($factoryInstance, $className), self::EXCEPTION_CLASS_NOT_FOUND);
                }
 
-               // Then Prepare the call-back function
-               $callback = sprintf("%s::create%s",
-                       $className,
+               // Create method name
+               $methodName = sprintf("create%s",
                        $className
                );
 
                // Run the user function
-               $objectInstance = call_user_func_array($callback, $args);
+               $objectInstance = call_user_func_array(array($className, $methodName), $args);
 
                // Count generated objects up
                self::$total++;