Library/Loader.php
private static function _autoload($class)
    {
        $realClass = $class;
        if (preg_match('/^JProxy_/i', $class)) {
            $class = preg_replace('/^JProxy_/i', '', $class);
        }
        foreach (self::$prefixes as $prefix => $lookup) {
            $chr = strlen($prefix) < strlen($class) ? $class[strlen($prefix)] : 0;

            if (strpos($class, $prefix) === 0 && ($chr === strtoupper($chr))) {
                $existsBefore = class_exists($realClass, false);
                if ($realClass === $class) {
                    self::loadByAlias($realClass);
                    self::load($realClass);
                }
                $return = true;
                if (!$existsBefore && !class_exists($class, false)) {
                    $return = self::_load(substr($class, strlen($prefix)), $lookup);
                }
                if ($realClass === $class && !$existsBefore && class_exists($realClass, false)) {
                    self::injectStaticDependencies($class);
                }

                return $return;
            }
        }

        return false;
    }
private static function _autoload($class)
    {
        $realClass = $class;
        if (preg_match('/^JProxy_/i', $class)) {
            $class = preg_replace('/^JProxy_/i', '', $class);
        }
        foreach (self::$prefixes as $prefix => $lookup) {
            $chr = strlen($prefix) < strlen($class) ? $class[strlen($prefix)] : 0;

            if (strpos($class, $prefix) === 0 && ($chr === strtoupper($chr))) {
                $existsBefore = class_exists($realClass, false);
                if ($realClass === $class) {
                    self::loadByAlias($realClass);
                    self::load($realClass);
                }
                $return = true;
                if (!$existsBefore && !class_exists($class, false)) {
                    $return = self::_load(substr($class, strlen($prefix)), $lookup);
                }
                if ($realClass === $class && !$existsBefore && class_exists($realClass, false)) {
                    self::injectStaticDependencies($class);
                }

                return $return;
            }
        }

        return false;
    }
private static function _autoload ( $ class ) { $ realClass = $ class ; if ( preg_match ( '/^JProxy_/i' , $ class ) ) { $ class = preg_replace ( '/^JProxy_/i' , '' , $ class ) ; } foreach ( self :: $ prefixes as $ prefix => $ lookup ) { $ chr = strlen ( $ prefix ) < strlen ( $ class ) ? $ class [ strlen ( $ prefix ) ] : 0 ; if ( strpos ( $ class , $ prefix ) === 0 && ( $ chr === strtoupper ( $ chr ) ) ) { $ existsBefore = class_exists ( $ realClass , false ) ; if ( $ realClass === $ class ) { self :: loadByAlias ( $ realClass ) ; self :: load ( $ realClass ) ; } $ return = true ; if ( ! $ existsBefore && ! class_exists ( $ class , false ) ) { $ return = self :: _load ( substr ( $ class , strlen ( $ prefix ) ) , $ lookup ) ; } if ( $ realClass === $ class && ! $ existsBefore && class_exists ( $ realClass , false ) ) { self :: injectStaticDependencies ( $ class ) ; } return $ return ; } } return false ; }
Autoload a class based on name.

@param   string $class The class to be loaded.

@return  bool     True if the class was loaded, false otherwise.
@author Maximilian Ruta <mr@xtain.net>
Autoload a class based on name .