public static function register()
    {
        // In some shops (OpenCart1) there's not one central entry point and
        // we may risk registering twice.
        static $hasBeenRegistered = false;

        if (!$hasBeenRegistered) {
            $dir = __DIR__ . '/src/';
            $ourNamespace = 'Siel\\Acumulus\\';
            $ourNamespaceLen = strlen($ourNamespace);
            $autoloadFunction = function ($class) use ($ourNamespace, $ourNamespaceLen, $dir) {
                if (strncmp($class, $ourNamespace, $ourNamespaceLen) === 0) {
                    $fileName = $dir . str_replace('\\', DIRECTORY_SEPARATOR, substr($class, $ourNamespaceLen)) . '.php';
                    if (is_readable($fileName)) {
                        /** @noinspection PhpIncludeInspection */
                        include($fileName);
                    }
                }
            };
            // Prepend this autoloader: it will not throw, nor warn, while the
            // shop specific autoloader might do so.
            spl_autoload_register($autoloadFunction, true, true);
            $hasBeenRegistered = true;
        }
    }