X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffactories%2Fobjects%2Fclass_ObjectFactory.php;h=6e4a4dc2e89fa53a60a4d5b3a6204ea08731e4c5;hb=607a11e2c22949ea0647568c17d62a605595e83b;hp=08a9352b5406a83db9b73354da03f97da7afb406;hpb=4b88c118b615335d06bd74e444173d21aef4406c;p=core.git diff --git a/inc/classes/main/factories/objects/class_ObjectFactory.php b/inc/classes/main/factories/objects/class_ObjectFactory.php index 08a9352b..6e4a4dc2 100644 --- a/inc/classes/main/factories/objects/class_ObjectFactory.php +++ b/inc/classes/main/factories/objects/class_ObjectFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -22,11 +22,6 @@ * along with this program. If not, see . */ class ObjectFactory extends BaseFactory { - /** - * Total objects generated - */ - private static $total = 0; - /** * Protected constructor * @@ -70,8 +65,8 @@ class ObjectFactory extends BaseFactory { // Run the user function $objectInstance = call_user_func_array(array($className, $methodName), $args); - // Count generated objects up - self::$total++; + // Count this one up + self::countObject($className); // Return the prepared instance return $objectInstance; @@ -86,7 +81,7 @@ class ObjectFactory extends BaseFactory { */ public static final function createObjectByConfiguredName ($configEntry, array $args=array()) { // Read the configuration entry - $className = FrameworkConfiguration::getInstance()->getConfigEntry($configEntry); + $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry($configEntry); // Send this to the other factory... $objectInstance = self::createObjectByName($className, $args); @@ -94,15 +89,6 @@ class ObjectFactory extends BaseFactory { // Return the instance return $objectInstance; } - - /** - * Static getter for total object count - * - * @return $total Total amount of generated objects - */ - public static final function getTotal () { - return self::$total; - } } // [EOF]