public static function factory($name, array $constructorArgs = array())
    {
        $reflectionClass = new \ReflectionClass(sprintf('AppserverIo\Appserver\Core\Commands\%sCommand', ucfirst($name)));
        return $reflectionClass->newInstanceArgs($constructorArgs);
    }
public static function factory($name, array $constructorArgs = array())
    {
        $reflectionClass = new \ReflectionClass(sprintf('AppserverIo\Appserver\Core\Commands\%sCommand', ucfirst($name)));
        return $reflectionClass->newInstanceArgs($constructorArgs);
    }
public static function factory ( $ name , array $ constructorArgs = array ( ) ) { $ reflectionClass = new \ ReflectionClass ( sprintf ( 'AppserverIo\Appserver\Core\Commands\%sCommand' , ucfirst ( $ name ) ) ) ; return $ reflectionClass -> newInstanceArgs ( $ constructorArgs ) ; }
Creates and returns a new command instance of the command with the passed name.

@param string $name            ass name of the command to create the instance for
@param array  $constructorArgs The arguments passed to the constructor

@return \AppserverIo\Appserver\Core\Commands\CommandInterface The command instance
Creates and returns a new command instance of the command with the passed name .