*
* @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
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Set object description
- $this->setObjectDescription("Simple generic object factory");
-
- // Create unique ID number
- $this->generateUniqueId();
}
/**
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++;