public static function create($className, $arguments = null, $constructor = 'getInstance', $reflection = null)
    {
        // instantiate
        if (is_null($arguments)) {
            return call_user_func($className.'::'.$constructor);
        } else {
            // arguments
            if (is_array($arguments)) {
                return call_user_func_array($className.'::'.$constructor, $arguments);
            } else {
                return call_user_func($className.'::'.$constructor, $arguments);
            }
        }
    }
public static function create($className, $arguments = null, $constructor = 'getInstance', $reflection = null)
    {
        // instantiate
        if (is_null($arguments)) {
            return call_user_func($className.'::'.$constructor);
        } else {
            // arguments
            if (is_array($arguments)) {
                return call_user_func_array($className.'::'.$constructor, $arguments);
            } else {
                return call_user_func($className.'::'.$constructor, $arguments);
            }
        }
    }
public static function create ( $ className , $ arguments = null , $ constructor = 'getInstance' , $ reflection = null ) { // instantiate if ( is_null ( $ arguments ) ) { return call_user_func ( $ className . '::' . $ constructor ) ; } else { // arguments if ( is_array ( $ arguments ) ) { return call_user_func_array ( $ className . '::' . $ constructor , $ arguments ) ; } else { return call_user_func ( $ className . '::' . $ constructor , $ arguments ) ; } } }
This method is intend to create instances of singleton-classes. You can
pass optional arguments to the factory for creating instance and passing arguments
to it.

@param string $className   The name of the class to instantiate
@param mixed  $arguments   The arguments to pass to class for instantiation
@param string $constructor Signature of the instantiation-method (constructor)
@param string $reflection  NOT USED but part of interface/contract

@author Benjamin Carl <opensource@clickalicious.de>

@return object An instance of the requested class
@static
This method is intend to create instances of singleton - classes . You can pass optional arguments to the factory for creating instance and passing arguments to it .