public function findFile($class, array $prefixPaths, array $basePaths = [], $useIncludePath = false)
    {
        if ($file = $this->searchNamespaces($prefixPaths, $class, true)) {
            return $file;
        }

        $class = preg_replace('/_(?=[^\\\\]*$)/', '\\', $class);

        if ($file = $this->searchNamespaces($basePaths, $class, false)) {
            return $file;
        } elseif ($useIncludePath) {
            return $this->searchDirectories(explode(PATH_SEPARATOR, get_include_path()), $class);
        }

        return false;
    }
public function findFile($class, array $prefixPaths, array $basePaths = [], $useIncludePath = false)
    {
        if ($file = $this->searchNamespaces($prefixPaths, $class, true)) {
            return $file;
        }

        $class = preg_replace('/_(?=[^\\\\]*$)/', '\\', $class);

        if ($file = $this->searchNamespaces($basePaths, $class, false)) {
            return $file;
        } elseif ($useIncludePath) {
            return $this->searchDirectories(explode(PATH_SEPARATOR, get_include_path()), $class);
        }

        return false;
    }
public function findFile ( $ class , array $ prefixPaths , array $ basePaths = [ ] , $ useIncludePath = false ) { if ( $ file = $ this -> searchNamespaces ( $ prefixPaths , $ class , true ) ) { return $ file ; } $ class = preg_replace ( '/_(?=[^\\\\]*$)/' , '\\' , $ class ) ; if ( $ file = $ this -> searchNamespaces ( $ basePaths , $ class , false ) ) { return $ file ; } elseif ( $ useIncludePath ) { return $ this -> searchDirectories ( explode ( PATH_SEPARATOR , get_include_path ( ) ) , $ class ) ; } return false ; }
Attempts to find a file for the given class from given paths.

Both lists of paths must be given as arrays with keys indicating the
namespace. Empty string can be used for the paths that apply to all
Classes. Each value must be an array of paths.

@param string $class Full name of the class
@param array $prefixPaths List of paths used for PSR-4 file search
@param array $basePaths List of paths used for PSR-0 file search
@param bool $useIncludePath Whether to use paths in include_path for PSR-0 search or not
@return string|false Path to the class file or false if not found
Attempts to find a file for the given class from given paths .