private function autoloadThrowFilesystem($namespace, $classname)
    {
        if (false === is_array($this->_namespaces)) {
            return false;
        }

        $pathfiles = array();
        if (false === is_array($this->_includeExtensions)
                || 0 == count($this->_includeExtensions)) {
            $pathfiles[] = str_replace(NAMESPACE_SEPARATOR, DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.$classname;
        } else {
            foreach ($this->_includeExtensions as $ext) {
                $pathfiles[] = str_replace(NAMESPACE_SEPARATOR, DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.$classname.$ext;
            }
        }

        foreach ($this->_namespaces as $n => $paths) {
            if (strpos($namespace, $n) === 0) {
                foreach ($paths as $path) {
                    foreach ($pathfiles as $pathfile) {
                        $filename = $path.DIRECTORY_SEPARATOR.$pathfile;
                        if (false === file_exists($filename)) {
                            $filename = $path.DIRECTORY_SEPARATOR.str_replace(str_replace(NAMESPACE_SEPARATOR, DIRECTORY_SEPARATOR, $n), '', $pathfile);
                        }

                        if (true === file_exists($filename) && true === is_readable($filename)) {
                            try {
                                include_once $filename;

                                return true;
                            } catch (\RuntimeException $e) {
                                // The include php file is not valid
                                throw new Exception\SyntaxErrorException($e->getMessage(), null, $e->getPrevious());
                            }
                        }
                    }
                }

                $this->_registeredNamespace = true;
            }
        }

        return false;
    }
private function autoloadThrowFilesystem($namespace, $classname)
    {
        if (false === is_array($this->_namespaces)) {
            return false;
        }

        $pathfiles = array();
        if (false === is_array($this->_includeExtensions)
                || 0 == count($this->_includeExtensions)) {
            $pathfiles[] = str_replace(NAMESPACE_SEPARATOR, DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.$classname;
        } else {
            foreach ($this->_includeExtensions as $ext) {
                $pathfiles[] = str_replace(NAMESPACE_SEPARATOR, DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.$classname.$ext;
            }
        }

        foreach ($this->_namespaces as $n => $paths) {
            if (strpos($namespace, $n) === 0) {
                foreach ($paths as $path) {
                    foreach ($pathfiles as $pathfile) {
                        $filename = $path.DIRECTORY_SEPARATOR.$pathfile;
                        if (false === file_exists($filename)) {
                            $filename = $path.DIRECTORY_SEPARATOR.str_replace(str_replace(NAMESPACE_SEPARATOR, DIRECTORY_SEPARATOR, $n), '', $pathfile);
                        }

                        if (true === file_exists($filename) && true === is_readable($filename)) {
                            try {
                                include_once $filename;

                                return true;
                            } catch (\RuntimeException $e) {
                                // The include php file is not valid
                                throw new Exception\SyntaxErrorException($e->getMessage(), null, $e->getPrevious());
                            }
                        }
                    }
                }

                $this->_registeredNamespace = true;
            }
        }

        return false;
    }
private function autoloadThrowFilesystem ( $ namespace , $ classname ) { if ( false === is_array ( $ this -> _namespaces ) ) { return false ; } $ pathfiles = array ( ) ; if ( false === is_array ( $ this -> _includeExtensions ) || 0 == count ( $ this -> _includeExtensions ) ) { $ pathfiles [ ] = str_replace ( NAMESPACE_SEPARATOR , DIRECTORY_SEPARATOR , $ namespace ) . DIRECTORY_SEPARATOR . $ classname ; } else { foreach ( $ this -> _includeExtensions as $ ext ) { $ pathfiles [ ] = str_replace ( NAMESPACE_SEPARATOR , DIRECTORY_SEPARATOR , $ namespace ) . DIRECTORY_SEPARATOR . $ classname . $ ext ; } } foreach ( $ this -> _namespaces as $ n => $ paths ) { if ( strpos ( $ namespace , $ n ) === 0 ) { foreach ( $ paths as $ path ) { foreach ( $ pathfiles as $ pathfile ) { $ filename = $ path . DIRECTORY_SEPARATOR . $ pathfile ; if ( false === file_exists ( $ filename ) ) { $ filename = $ path . DIRECTORY_SEPARATOR . str_replace ( str_replace ( NAMESPACE_SEPARATOR , DIRECTORY_SEPARATOR , $ n ) , '' , $ pathfile ) ; } if ( true === file_exists ( $ filename ) && true === is_readable ( $ filename ) ) { try { include_once $ filename ; return true ; } catch ( \ RuntimeException $ e ) { // The include php file is not valid throw new Exception \ SyntaxErrorException ( $ e -> getMessage ( ) , null , $ e -> getPrevious ( ) ) ; } } } } $ this -> _registeredNamespace = true ; } } return false ; }
Looks for class definition using the PHP 5.3 standards to the namespace.

@param string $namespace the namespace's class
@param string $classname the class name looked for

@return Boolean TRUE if the class is found FALSE else

@throws \BackBee\AutoLoader\Exception\SyntaxErrorException Occurs when the found PHP code is not valid
Looks for class definition using the PHP 5 . 3 standards to the namespace .