public function load($className)
    {

        $name = $className;
        if ($this->_nameSpace) {

            $ns = rtrim($this->_nameSpace, '\\').'\\';

            $nameLen = strlen($className);
            $nsLen = strlen($ns);

            if ($nameLen < $nsLen || substr($className, 0, $nsLen) !== $ns)
                return false;

            $name = substr($name, $nsLen);
        }

        $ds = \DIRECTORY_SEPARATOR;
        $path = $this->_path ? $this->_path.$ds : '';
        $path .= str_replace(['_', '\\'], $ds, sprintf($this->_fileNamePattern, $name));

        if (($path = stream_resolve_include_path($path)) !== false)
            include $path;

        return class_exists($className, false);
    }
public function load($className)
    {

        $name = $className;
        if ($this->_nameSpace) {

            $ns = rtrim($this->_nameSpace, '\\').'\\';

            $nameLen = strlen($className);
            $nsLen = strlen($ns);

            if ($nameLen < $nsLen || substr($className, 0, $nsLen) !== $ns)
                return false;

            $name = substr($name, $nsLen);
        }

        $ds = \DIRECTORY_SEPARATOR;
        $path = $this->_path ? $this->_path.$ds : '';
        $path .= str_replace(['_', '\\'], $ds, sprintf($this->_fileNamePattern, $name));

        if (($path = stream_resolve_include_path($path)) !== false)
            include $path;

        return class_exists($className, false);
    }
public function load ( $ className ) { $ name = $ className ; if ( $ this -> _nameSpace ) { $ ns = rtrim ( $ this -> _nameSpace , '\\' ) . '\\' ; $ nameLen = strlen ( $ className ) ; $ nsLen = strlen ( $ ns ) ; if ( $ nameLen < $ nsLen || substr ( $ className , 0 , $ nsLen ) !== $ ns ) return false ; $ name = substr ( $ name , $ nsLen ) ; } $ ds = \ DIRECTORY_SEPARATOR ; $ path = $ this -> _path ? $ this -> _path . $ ds : '' ; $ path .= str_replace ( [ '_' , '\\' ] , $ ds , sprintf ( $ this -> _fileNamePattern , $ name ) ) ; if ( ( $ path = stream_resolve_include_path ( $ path ) ) !== false ) include $ path ; return class_exists ( $ className , false ) ; }
Loads a class based on its class name
If it's not found, it's simply ignored in order to let another loader try to load it
If it's the only loader, an error will be thrown after a failed loading

There's no loader recursion, the final check uses the second parameter of class_exists() to
not trigger another autoloader inside this one

@param $className The FQCN of the class to load

@return bool Has the class been loaded or not
Loads a class based on its class name If it s not found it s simply ignored in order to let another loader try to load it If it s the only loader an error will be thrown after a failed loading