public static function load($class)
    {
        /* Protects us from possible remote code inclusion due to:
           https://bugs.php.net/bug.php?id=55475
           We should already be safe without this check due to the
           way this autoloader works, but this helps other autoloaders
           that use other mechanisms and may be vulnerable. */
        if (strpos($class, ":") !== false) {
            // Safer than returning false as it prevents
            // other autoloaders from ever executing...
            throw new \Exception('Possible remote code injection detected');
        }

        // need to check if there's a current map file specified ALSO.
        // this could be the first time writing it.
        $mapped = self::isMapped($class);
        if ($mapped) {
            require_once self::$map[$class];
            if (!self::loadSuccessful($class)) {
                // record this failure & keep going, we may still find it
                self::$unmapped[] = $class;
            } else {
                return true;
            }
        }

        $file = str_replace(
            array('_', '\\'),
            DIRECTORY_SEPARATOR,
            $class
        ) . '.php';
        foreach (self::$paths as $path) {
            if (file_exists($path . DIRECTORY_SEPARATOR . $file)) {
                require_once $path . DIRECTORY_SEPARATOR . $file;
                if (!self::loadSuccessful($class)) {
                    throw new \Exception(
                        'Class ' . $class . ' was not present in ' .
                        $path . DIRECTORY_SEPARATOR . $file .
                        '") [Autoload]'
                    );
                }

                if (in_array($class, self::$unmapped)) {
                    self::updateMap(
                        $class,
                        $path . DIRECTORY_SEPARATOR . $file
                    );
                }
                return true;
            }
        }

        $e = new \Exception(
            'Class ' . $class . ' could not be loaded from ' .
            $file . ', file does not exist (registered paths="' .
            implode(PATH_SEPARATOR, self::$paths) .
            '") [Autoload]'
        );
        $trace = $e->getTrace();
        if (isset($trace[2]) && isset($trace[2]['function']) &&
            in_array(
                $trace[2]['function'],
                array('class_exists', 'interface_exists')
            )) {
            return false;
        }
        if (isset($trace[1]) && isset($trace[1]['function']) &&
            in_array(
                $trace[1]['function'],
                array('class_exists', 'interface_exists')
            )) {
            return false;
        }

        // If there are other autoload functions registered,
        // let's try to play nicely with them...
        // ...otherwise, we just throw an exception.
        if (count(spl_autoload_functions()) == 1) {
            throw $e;
        }
        return false;
    }