private function searchDirectories(array $directories, $class)
    {
        foreach ($directories as $directory) {
            $directory = trim($directory);
            $path = preg_replace('/[\\/\\\\]+/', DIRECTORY_SEPARATOR, $directory . '/' . $class);

            if ($directory && $file = $this->searchExtensions($path)) {
                return $file;
            }
        }

        return false;
    }
private function searchDirectories(array $directories, $class)
    {
        foreach ($directories as $directory) {
            $directory = trim($directory);
            $path = preg_replace('/[\\/\\\\]+/', DIRECTORY_SEPARATOR, $directory . '/' . $class);

            if ($directory && $file = $this->searchExtensions($path)) {
                return $file;
            }
        }

        return false;
    }
private function searchDirectories ( array $ directories , $ class ) { foreach ( $ directories as $ directory ) { $ directory = trim ( $ directory ) ; $ path = preg_replace ( '/[\\/\\\\]+/' , DIRECTORY_SEPARATOR , $ directory . '/' . $ class ) ; if ( $ directory && $ file = $ this -> searchExtensions ( $ path ) ) { return $ file ; } } return false ; }
Searches for the class file in the list of directories.
@param string[] $directories List of directory paths where to look for the class
@param string $class Part of the class name that translates to the file name
@return string|false Path to the class file or false if not found
Searches for the class file in the list of directories .