Made ObjectFactory really work
authorSebastian Kurfürst <sebastian@typo3.org>
Sat, 28 Mar 2009 13:00:54 +0000 (13:00 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Sat, 28 Mar 2009 13:00:54 +0000 (13:00 +0000)
typo3/sysext/fluid/Classes/Compatibility/ObjectFactory.php

index 5789a95..f6ec6cb 100644 (file)
@@ -33,14 +33,8 @@ class Tx_Fluid_Compatibility_ObjectFactory implements t3lib_Singleton {
 
        public function create($objectName) {
                $constructorArguments = func_get_args();
-               array_shift($constructorArguments);
 
-               if (count($constructorArguments)) {
-                       $reflectedClass = new ReflectionClass($objectName);
-                       $object = $reflectedClass->newInstanceArgs($constructorArguments);
-               } else {
-                       $object = new $objectName;
-               }
+               $object = call_user_func_array('t3lib_div::makeInstance',$constructorArguments);
 
                $injectVariables = array();
                if (isset($this->injectors[$objectName])) {