<?php

// Dynamic Composer autoloader generated for the Iran-only OpenCart package.
class ComposerAutoloaderInit7e91736ee6f2ba04cea5881fb95f1857
{
    private static $loader;

    public static function loadClassLoader($class)
    {
        if ('Composer\Autoload\ClassLoader' === $class) {
            require __DIR__ . '/ClassLoader.php';
        }
    }

    public static function getLoader()
    {
        if (null !== self::$loader) {
            return self::$loader;
        }

        require __DIR__ . '/platform_check.php';
        spl_autoload_register(array('ComposerAutoloaderInit7e91736ee6f2ba04cea5881fb95f1857', 'loadClassLoader'), true, true);
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(dirname(__DIR__));
        spl_autoload_unregister(array('ComposerAutoloaderInit7e91736ee6f2ba04cea5881fb95f1857', 'loadClassLoader'));

        $blocked = static function ($path) {
            $path = str_replace('\\', '/', (string)$path);
            return strpos($path, '/braintree/') !== false || strpos($path, '/cardinity/') !== false || strpos($path, '/zoujingli/') !== false;
        };

        $map = require __DIR__ . '/autoload_namespaces.php';
        foreach ($map as $namespace => $paths) {
            $paths = array_values(array_filter((array)$paths, static function ($path) use ($blocked) { return !$blocked($path); }));
            if ($paths) {
                $loader->set($namespace, $paths);
            }
        }

        $map = require __DIR__ . '/autoload_psr4.php';
        foreach ($map as $namespace => $paths) {
            $paths = array_values(array_filter((array)$paths, static function ($path) use ($blocked) { return !$blocked($path); }));
            if ($paths) {
                $loader->setPsr4($namespace, $paths);
            }
        }

        $classMap = require __DIR__ . '/autoload_classmap.php';
        foreach ($classMap as $class => $path) {
            if ($blocked($path)) {
                unset($classMap[$class]);
            }
        }
        if ($classMap) {
            $loader->addClassMap($classMap);
        }
        $loader->register(true);

        $filesToLoad = require __DIR__ . '/autoload_files.php';
        $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
            if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
                $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
                require $file;
            }
        }, null, null);
        foreach ($filesToLoad as $fileIdentifier => $file) {
            if (!$blocked($file)) {
                $requireFile($fileIdentifier, $file);
            }
        }

        return $loader;
    }
}
