public static function getInstance($appId, $testMode = false, $cache = false, $compression = false)
    {
        if (!isset(self::$instances[$appId])) {
            $config = new Config($appId);
            $config->setTestMode($testMode);
            $config->setCache($cache);
            $config->setCompression($compression);

            $webServiceFactory = new WebServiceFactory();
            $wsdlManager = new WsdlManager($webServiceFactory, $config);

            // Out of box integrace s $_SESSION
            $sessionAdapter = new SessionAdapter();
            $user = new User($wsdlManager, $sessionAdapter);

            self::$instances[$appId] = new self($wsdlManager, $user);
        }

        return self::$instances[$appId];
    }